From aed6e9d7c18bab0ff59cf39c16ddd68b83594f0f Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 13 Sep 2023 07:45:48 +0200 Subject: [PATCH] build: switch to pyproject & flint (#42) --- MANIFEST.in | 3 +-- pyproject.toml | 32 ++++++++++++++++++++++++++++++++ requirements.txt | 6 ------ setup.py | 19 ------------------- 4 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in index 58f49a95..50b0f499 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,4 @@ include MANIFEST.in -include requirements.txt include *.json include *.md include *.py @@ -15,4 +14,4 @@ recursive-include payments *.png recursive-include payments *.py recursive-include payments *.svg recursive-include payments *.txt -recursive-exclude payments *.pyc \ No newline at end of file +recursive-exclude payments *.pyc diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..46c94ee9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,32 @@ +[project] +name = "payments" +authors = [ + { name = "Frappe Technologies Pvt Ltd", email = "hello@frappe.io"} +] +description = "Payments app for frappe" +requires-python = ">=3.10" +readme = "README.md" +dynamic = ["version"] +dependencies = [ + "paytmchecksum~=1.7.0", + "razorpay~=1.2.0", + "stripe~=2.56.0", + "braintree~=4.20.0", + "pycryptodome~=3.18.0", +] + +[build-system] +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + +[tool.black] +line-length = 99 + +[tool.isort] +line_length = 99 +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +use_parentheses = true +ensure_newline_before_comments = true +indent = "\t" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 189dbaf2..00000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -# frappe -- https://github.com/frappe/frappe is installed via 'bench init' -paytmchecksum~=1.7.0 -razorpay~=1.2.0 -stripe~=2.56.0 -braintree~=4.20.0 -pycryptodome~=3.18.0 diff --git a/setup.py b/setup.py deleted file mode 100644 index c6ebbc9c..00000000 --- a/setup.py +++ /dev/null @@ -1,19 +0,0 @@ -from setuptools import find_packages, setup - -with open("requirements.txt") as f: - install_requires = f.read().strip().split("\n") - -# get version from __version__ variable in pay/__init__.py -from payments import __version__ as version - -setup( - name="payments", - version=version, - description="Payments app for frappe", - author="Frappe Technologies", - author_email="hello@frappe.io", - packages=find_packages(), - zip_safe=False, - include_package_data=True, - install_requires=install_requires, -)