diff --git a/.gitignore b/.gitignore index c32feed33..6e8d55403 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.py[co] *~ *\.egg* +dist docs/_build payments/version.py .coverage diff --git a/pyproject.toml b/pyproject.toml index 365ccf469..bf63519d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,59 @@ [build-system] requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"] +[project] +name = "django-payments" +authors = [ + {name = "Mirumee Software", email = "hello@mirumee.com"}, +] +description = "Universal payment handling for Django" +readme = "README.rst" +requires-python = ">=3.7" +keywords = ["payments"] +license = {text = "BSD"} +classifiers = [ + "Environment :: Web Environment", + "Framework :: Django :: 2.2", + "Framework :: Django :: 3.0", + "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Framework :: Django", + "Topic :: Software Development :: Libraries :: Application Frameworks", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "Django>=2.2", + "requests>=1.2.0", + "django-phonenumber-field[phonenumberslite]>=5.0.0", +] +dynamic = ["version"] + +[project.optional-dependencies] +braintree = ["braintree>=3.14.0"] +cybersource = ["suds-community>=0.6"] +docs = ["sphinx_rtd_theme"] +mercadopago = ["mercadopago>=2.0.0,<3.0.0"] +sagepay = ["cryptography>=1.1.0"] +sofort = ["xmltodict>=0.9.2"] +stripe = ["stripe>=2.6.0"] + +[project.urls] +homepage = "https://github.com/jazzband/django-payments" +documentation = "https://django-payments.readthedocs.io/" +changelog = "https://django-payments.readthedocs.io/en/latest/changelog.html" +issues = "https://github.com/jazzband/django-payments/issues" + [tool.coverage.report] exclude_lines = [ "if TYPE_CHECKING:", @@ -69,3 +122,6 @@ required-imports = ["from __future__ import annotations"] [tool.setuptools_scm] write_to = "payments/version.py" version_scheme = "post-release" + +[tool.setuptools.packages.find] +include = ["payments*"] diff --git a/setup.py b/setup.py deleted file mode 100755 index 34fca57ff..000000000 --- a/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python -from __future__ import annotations - -from setuptools import setup - -PACKAGES = [ - "payments", - "payments.authorizenet", - "payments.braintree", - "payments.coinbase", - "payments.cybersource", - "payments.dummy", - "payments.dotpay", - "payments.paypal", - "payments.sagepay", - "payments.sofort", - "payments.stripe", -] - -with open("README.rst") as f: - readme = f.read() - -setup( - name="django-payments", - author="Mirumee Software", - author_email="hello@mirumee.com", - description="Universal payment handling for Django", - long_description=readme, - use_scm_version={ - "version_scheme": "post-release", - "write_to": "payments/version.py", - }, - setup_requires=["setuptools_scm"], - url="https://github.com/jazzband/django-payments", - packages=PACKAGES, - include_package_data=True, - classifiers=[ - "Environment :: Web Environment", - "Framework :: Django :: 2.2", - "Framework :: Django :: 3.0", - "Framework :: Django :: 3.1", - "Framework :: Django :: 3.2", - "Framework :: Django :: 4.0", - "Framework :: Django :: 4.1", - "Framework :: Django :: 4.2", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Framework :: Django", - "Topic :: Software Development :: Libraries :: Application Frameworks", - "Topic :: Software Development :: Libraries :: Python Modules", - ], - install_requires=[ - "Django>=2.2", - "requests>=1.2.0", - "django-phonenumber-field[phonenumberslite]>=5.0.0", - ], - extras_require={ - "braintree": ["braintree>=3.14.0"], - "cybersource": ["suds-community>=0.6"], - "docs": ["sphinx_rtd_theme"], - "mercadopago": ["mercadopago>=2.0.0,<3.0.0"], - "sagepay": ["cryptography>=1.1.0"], - "sofort": ["xmltodict>=0.9.2"], - "stripe": ["stripe>=2.6.0"], - }, - zip_safe=False, -)