Skip to content

Commit

Permalink
Move setup.py config to pyproject.toml (#133)
Browse files Browse the repository at this point in the history
* Move setup.py meta to pyproject.toml and update build tools

* Add changelog and issue links to pyproject.toml

* Adjust order of classifiers

* Add license classifier [skip ci]

* Fix setuptools not getting version

* Don't include test package in build

---------

Co-authored-by: Steven Sklar <[email protected]>
  • Loading branch information
mikemanger and sklarsa authored Dec 2, 2024
1 parent 4546b63 commit c87b01d
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 51 deletions.
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
black==22.3.0
build
coverage==7.2.7
flake8==3.8.4
importlib-metadata==3.6.0
Expand All @@ -10,4 +11,3 @@ pytest==7.1.3
pytest-cov==4.1.0
tox==4.23.2
twine==3.3.0
wheel
3 changes: 1 addition & 2 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]" },
]
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
Expand All @@ -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]
Expand Down
48 changes: 0 additions & 48 deletions setup.py

This file was deleted.

0 comments on commit c87b01d

Please sign in to comment.