diff --git a/dev-requirements.txt b/dev-requirements.txt index 3b3bf8a..58c9ccf 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,5 @@ black==22.3.0 +build coverage==7.2.7 flake8==3.8.4 importlib-metadata==3.6.0 @@ -10,4 +11,3 @@ pytest==7.1.3 pytest-cov==4.1.0 tox==4.23.2 twine==3.3.0 -wheel diff --git a/publish.sh b/publish.sh index 916d741..453ddc4 100755 --- a/publish.sh +++ b/publish.sh @@ -4,7 +4,6 @@ set -eo pipefail if [ -d "dist/" ] ; then rm -r dist/ ; fi -python setup.py sdist -python setup.py bdist_wheel --universal +python -m build twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml index af5319e..f1c3e77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,42 @@ +[project] +name = "django-sendgrid-v5" +dynamic = ["version"] +description = "An implementation of Django's EmailBackend compatible with sendgrid-python v5+" +readme = "README.md" +license = {file = "LICENSE"} +authors = [ + { name = "Steven Sklar", email = "sklarsa@gmail.com" }, +] +keywords = [ + "backend", + "django", + "email", + "sendgrid", +] +classifiers = [ + "Framework :: Django", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +dependencies = [ + "django >=1.8", + "python-http-client >=3.0.0", + "sendgrid >=5.0.0", +] + +[project.urls] +Homepage = "https://github.com/sklarsa/django-sendgrid-v5" +Changelog = "https://github.com/sklarsa/django-sendgrid-v5/releases" +Bug = "https://github.com/sklarsa/django-sendgrid-v5/issues" + [tool.black] multi_line_output = 3 include_trailing_comma = true @@ -10,6 +49,12 @@ line_length = 88 profile = "black" multi_line_output = 3 +[tool.setuptools.dynamic] +version = {attr = "sendgrid_backend.version.__version__"} + +[tool.setuptools.packages.find] +exclude = ["test*"] + [tool.tox] legacy_tox_ini = """ [tox] diff --git a/setup.py b/setup.py deleted file mode 100644 index b492598..0000000 --- a/setup.py +++ /dev/null @@ -1,48 +0,0 @@ -from codecs import open -from os import path - -from setuptools import find_packages, setup - -here = path.abspath(path.dirname(__file__)) - -with open(path.join(here, "README.md"), encoding="utf-8") as f: - long_description = f.read() - -__version__ = None -with open("sendgrid_backend/version.py") as f: - exec(f.read()) - -setup( - name="django-sendgrid-v5", - version=str(__version__), - description="An implementation of Django's EmailBackend compatible with sendgrid-python v5+", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/sklarsa/django-sendgrid-v5", - license="MIT", - author="Steven Sklar", - author_email="sklarsa@gmail.com", - classifiers=[ - "Framework :: Django", - "Intended Audience :: Developers", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - ], - keywords="django email sendgrid backend", - packages=find_packages( - exclude=[ - "test", - ] - ), - install_requires=[ - "django >=1.8", - "sendgrid >=5.0.0", - "python-http-client >=3.0.0", - ], -)