-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to modern packaging backed by setuptools and setuptools-scm, including a VCS-backed versioning scheme, as well as trusted publishing configuration for PyPI.
- Loading branch information
1 parent
3b920ec
commit 5a5fba4
Showing
7 changed files
with
126 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,3 +134,6 @@ dmypy.json | |
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Dynamic version file | ||
src/phantom/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ exclude *.yaml | |
exclude *.yml | ||
include README.md | ||
include LICENSE | ||
exclude .gitignore | ||
exclude setup.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,83 @@ | ||
[build-system] | ||
requires = ["setuptools>=67.4.0", "wheel"] | ||
requires = [ | ||
"setuptools==74.1.2", | ||
"setuptools-scm==8.1.0", | ||
"wheel==0.44.0", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
version_file = "src/phantom/_version.py" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
|
||
[tool.setuptools.dynamic] | ||
readme = {file = "README.md", content-type = "text/markdown; charset=UTF-8"} | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
namespaces = false | ||
|
||
|
||
[project] | ||
name = "phantom-type" | ||
description = "Phantom types for Python" | ||
requires-python = ">=3.9" | ||
authors = [ | ||
{ name="Anton Agestam", email="[email protected]" }, | ||
] | ||
license = {text = "BSD-3-Clause"} | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"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", | ||
"Development Status :: 5 - Production/Stable", | ||
] | ||
dynamic = ["version", "readme"] | ||
dependencies = [ | ||
# typeguard 4.3.0 breaks "intersection" protocols, see linked issue. I didn't figure | ||
# out a way to work around this at the moment, so it needs to be pinned. | ||
# https://github.com/antonagestam/phantom-types/issues/299 | ||
"typeguard>=4,<4.3.0", | ||
"typing_extensions>=4.3.0", | ||
"numerary>=0.4.3", | ||
] | ||
|
||
[project.optional-dependencies] | ||
phonenumbers = ["phonenumbers>=8.12.41"] | ||
pydantic = ["pydantic>=1.9.0,<2"] | ||
dateutil = ["python-dateutil>=2.8.2"] | ||
hypothesis = ["hypothesis[zoneinfo]>=6.68.0"] | ||
all = [ | ||
"phantom-types[phonenumbers]", | ||
"phantom-types[pydantic]", | ||
"phantom-types[dateutil]", | ||
"phantom-types[hypothesis]", | ||
] | ||
test = [ | ||
"mypy>=0.991", | ||
"pytest", | ||
"pytest-mypy-plugins>=1.9.3", | ||
"coverage", | ||
] | ||
|
||
[project.urls] | ||
"Source Repository" = "https://github.com/antonagestam/phantom-types/" | ||
"Documentation" = "https://phantom-types.readthedocs.io/en/stable/" | ||
|
||
|
||
[tool.check-manifest] | ||
ignore = ["src/phantom/_version.py"] | ||
|
||
|
||
[tool.black] | ||
target-version = ["py39"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,18 @@ | ||
[metadata] | ||
name = phantom-types | ||
version = attr: phantom.__version__ | ||
description = Phantom types for Python | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown; charset=UTF-8 | ||
license = BSD 3-Clause License | ||
license_file = LICENSE | ||
classifiers = | ||
Intended Audience :: Developers | ||
Operating System :: OS Independent | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
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 | ||
Development Status :: 5 - Production/Stable | ||
author = Anton Agestam | ||
author_email = [email protected] | ||
url = https://github.com/antonagestam/phantom-types/ | ||
project_urls = | ||
Source Repository = https://github.com/antonagestam/phantom-types/ | ||
Documentation = https://phantom-types.readthedocs.io/en/stable/ | ||
|
||
[options] | ||
include_package_data = True | ||
package_dir = | ||
=src | ||
packages = find: | ||
python_requires = >=3.9 | ||
install_requires = | ||
# typeguard 4.3.0 breaks "intersection" protocols, see linked issue. I didn't figure | ||
# out a way to work around this at the moment, so it needs to be pinned. | ||
# https://github.com/antonagestam/phantom-types/issues/299 | ||
typeguard>=4,<4.3.0 | ||
typing_extensions>=4.3.0 | ||
numerary>=0.4.3 | ||
|
||
[options.packages.find] | ||
where = src | ||
|
||
[options.package_data] | ||
phantom = py.typed | ||
|
||
[options.extras_require] | ||
phonenumbers = | ||
phonenumbers>=8.12.41 | ||
pydantic = | ||
pydantic>=1.9.0,<2 | ||
dateutil = | ||
python-dateutil>=2.8.2 | ||
hypothesis = | ||
hypothesis[zoneinfo]>=6.68.0 | ||
all = | ||
phantom-types[phonenumbers] | ||
phantom-types[pydantic] | ||
phantom-types[dateutil] | ||
phantom-types[hypothesis] | ||
test = | ||
mypy>=0.991 | ||
pytest | ||
pytest-mypy-plugins>=1.9.3 | ||
coverage | ||
|
||
[mypy] | ||
python_version = 3.9 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters