From 20f85195f45f5b311e9ba02d82d08f0036928809 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 29 Jun 2022 12:23:17 +0530 Subject: [PATCH 1/3] build!: declarative builds --- .github/workflows/patch.yml | 2 +- .github/workflows/server-tests-mariadb.yml | 2 +- .github/workflows/server-tests-postgres.yml | 2 +- CODEOWNERS | 2 +- pyproject.toml | 29 +++++++++++++++++++++ requirements.txt | 11 -------- setup.py | 25 +++--------------- 7 files changed, 37 insertions(+), 36 deletions(-) delete mode 100644 requirements.txt diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 2cf44444cc..4d8c51d942 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -52,7 +52,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- ${{ runner.os }}- diff --git a/.github/workflows/server-tests-mariadb.yml b/.github/workflows/server-tests-mariadb.yml index 91a0114004..9dcc6560f9 100644 --- a/.github/workflows/server-tests-mariadb.yml +++ b/.github/workflows/server-tests-mariadb.yml @@ -74,7 +74,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- ${{ runner.os }}- diff --git a/.github/workflows/server-tests-postgres.yml b/.github/workflows/server-tests-postgres.yml index d3268e25b3..f62c22b0df 100644 --- a/.github/workflows/server-tests-postgres.yml +++ b/.github/workflows/server-tests-postgres.yml @@ -61,7 +61,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- ${{ runner.os }}- diff --git a/CODEOWNERS b/CODEOWNERS index bfc2601088..f0cb37919a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -32,4 +32,4 @@ erpnext/patches/ @deepeshgarg007 @nextchamp-saqib @marination @an erpnext/public/ @nextchamp-saqib @marination .github/ @ankush -requirements.txt @gavindsouza +pyproject.toml @gavindsouza @ankush diff --git a/pyproject.toml b/pyproject.toml index 8043dd9906..b39c4f072f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,32 @@ +[project] +name = "erpnext" +authors = [ + { name = "Frappe Technologies Pvt Ltd", email = "developers@frappe.io"} +] +description = "Open Source ERP" +requires-python = ">=3.8" +readme = "README.md" +dynamic = ["version"] +dependencies = [ + # Core dependencies + "pycountry~=20.7.3", + "python-stdnum~=1.16", + "Unidecode~=1.2.0", + "redisearch~=2.1.0", + + # integration dependencies + "gocardless-pro~=1.22.0", + "googlemaps", + "plaid-python~=7.2.1", + "python-youtube~=0.8.0", + "taxjar~=1.9.2", + "tweepy~=3.10.0", +] + +[build-system] +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + [tool.black] line-length = 99 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 83e53758be..0000000000 --- a/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -# frappe # https://github.com/frappe/frappe is installed during bench-init -gocardless-pro~=1.22.0 -googlemaps -plaid-python~=7.2.1 -pycountry~=20.7.3 -python-stdnum~=1.16 -python-youtube~=0.8.0 -taxjar~=1.9.2 -tweepy~=3.10.0 -Unidecode~=1.2.0 -redisearch~=2.1.0 diff --git a/setup.py b/setup.py index 1faff0412f..0ea4d07348 100644 --- a/setup.py +++ b/setup.py @@ -1,23 +1,6 @@ -from setuptools import setup, find_packages -import re, ast +# TODO: Remove this file when v15.0.0 is released +from setuptools import setup -# get version from __version__ variable in erpnext/__init__.py -_version_re = re.compile(r"__version__\s+=\s+(.*)") +name = "frappe" -with open("requirements.txt") as f: - install_requires = f.read().strip().split("\n") - -with open("erpnext/__init__.py", "rb") as f: - version = str(ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1))) - -setup( - name="erpnext", - version=version, - description="Open Source ERP", - author="Frappe Technologies", - author_email="info@erpnext.com", - packages=find_packages(), - zip_safe=False, - include_package_data=True, - install_requires=install_requires, -) +setup() From 0e3872aceba70aa00941b535ec1a688b64c6fd3e Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 29 Jun 2022 12:15:05 +0530 Subject: [PATCH 2/3] chore(meta): update CODEOWNERS Co-authored-by: Nabin Hait --- CODEOWNERS | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index f0cb37919a..ecbae86d96 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,32 +3,29 @@ # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, -erpnext/accounts/ @nextchamp-saqib @deepeshgarg007 -erpnext/assets/ @nextchamp-saqib @deepeshgarg007 -erpnext/erpnext_integrations/ @nextchamp-saqib +erpnext/accounts/ @nextchamp-saqib @deepeshgarg007 @ruthra-kumar +erpnext/assets/ @nextchamp-saqib @deepeshgarg007 @ruthra-kumar erpnext/loan_management/ @nextchamp-saqib @deepeshgarg007 -erpnext/regional @nextchamp-saqib @deepeshgarg007 -erpnext/selling @nextchamp-saqib @deepeshgarg007 +erpnext/regional @nextchamp-saqib @deepeshgarg007 @ruthra-kumar +erpnext/selling @nextchamp-saqib @deepeshgarg007 @ruthra-kumar erpnext/support/ @nextchamp-saqib @deepeshgarg007 pos* @nextchamp-saqib -erpnext/buying/ @marination @rohitwaghchaure @ankush +erpnext/buying/ @marination @rohitwaghchaure @s-aga-r erpnext/e_commerce/ @marination -erpnext/maintenance/ @marination @rohitwaghchaure -erpnext/manufacturing/ @marination @rohitwaghchaure @ankush +erpnext/maintenance/ @marination @rohitwaghchaure @s-aga-r +erpnext/manufacturing/ @marination @rohitwaghchaure @s-aga-r erpnext/portal/ @marination -erpnext/quality_management/ @marination @rohitwaghchaure +erpnext/quality_management/ @marination @rohitwaghchaure @s-aga-r erpnext/shopping_cart/ @marination -erpnext/stock/ @marination @rohitwaghchaure @ankush +erpnext/stock/ @marination @rohitwaghchaure @s-aga-r -erpnext/crm/ @ruchamahabal @pateljannat -erpnext/education/ @ruchamahabal @pateljannat -erpnext/hr/ @ruchamahabal @pateljannat -erpnext/payroll @ruchamahabal @pateljannat -erpnext/projects/ @ruchamahabal @pateljannat +erpnext/crm/ @NagariaHussain +erpnext/education/ @rutwikhdev +erpnext/projects/ @ruchamahabal -erpnext/controllers/ @deepeshgarg007 @nextchamp-saqib @rohitwaghchaure @marination @ankush -erpnext/patches/ @deepeshgarg007 @nextchamp-saqib @marination @ankush +erpnext/controllers/ @deepeshgarg007 @nextchamp-saqib @rohitwaghchaure @marination +erpnext/patches/ @deepeshgarg007 @nextchamp-saqib @marination erpnext/public/ @nextchamp-saqib @marination .github/ @ankush From cd0450b102367e1a5bb19561661049cced3f7727 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 29 Jun 2022 19:24:52 +0530 Subject: [PATCH 3/3] refactor: move dev-dependencies to pyproject --- dev-requirements.txt | 1 - pyproject.toml | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 dev-requirements.txt diff --git a/dev-requirements.txt b/dev-requirements.txt deleted file mode 100644 index 15545c0efa..0000000000 --- a/dev-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -hypothesis~=6.31.0 diff --git a/pyproject.toml b/pyproject.toml index b39c4f072f..d446c9b39e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,9 @@ dependencies = [ requires = ["flit_core >=3.4,<4"] build-backend = "flit_core.buildapi" +[tool.bench.dev-dependencies] +hypothesis = "~=6.31.0" + [tool.black] line-length = 99