-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from twisted/90-pyproject.toml
Support pyproject.toml
- Loading branch information
Showing
24 changed files
with
620 additions
and
317 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
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,17 +1,20 @@ | ||
include .coveragerc | ||
include LICENSE | ||
include NEWS.rst | ||
include towncrier.ini | ||
include SECURITY.md | ||
include tox.ini | ||
exclude mypy.ini | ||
include src/incremental/py.typed | ||
include _build_meta.py | ||
|
||
recursive-include src/incremental *.py | ||
include src/incremental/py.typed | ||
prune src/incremental/newsfragments | ||
|
||
prune .travis | ||
prune tests | ||
global-exclude .coverage* | ||
include .coveragerc | ||
|
||
exclude examplesetup.py | ||
prune src/exampleproj | ||
graft tests | ||
prune tests/example_*/src/*.egg-info | ||
prune tests/example_*/build | ||
prune tests/example_*/dist | ||
|
||
global-exclude __pycache__ *.py[cod] *~ | ||
|
||
prune src/incremental/newsfragments |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Comply with PEP 517's restictions on in-tree backends. | ||
We use setuptools to package Incremental and want to activate | ||
the in-tree Incremental plugin to manage its own version. To do | ||
this we specify ``backend-path`` in our ``pyproject.toml``, | ||
but PEP 517 requires that when ``backend-path`` is specified: | ||
> The backend code MUST be loaded from one of the directories | ||
> specified in backend-path (i.e., it is not permitted to | ||
> specify backend-path and not have in-tree backend code). | ||
We comply by re-publishing setuptools' ``build_meta``. | ||
""" | ||
|
||
from setuptools import build_meta | ||
|
||
__all__ = ["build_meta"] |
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,9 +1,57 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 44.1.1", | ||
"wheel >= 0.36.2", | ||
# Keep this aligned with the project dependencies. | ||
"setuptools >= 61.0", | ||
"tomli; python_version < '3.11'", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
backend-path = [".", "./src"] # See _build_meta.py | ||
build-backend = "_build_meta:build_meta" | ||
|
||
[project] | ||
name = "incremental" | ||
dynamic = ["version"] | ||
maintainers = [ | ||
{name = "Amber Brown", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Framework :: Setuptools Plugin", | ||
"Programming Language :: Python :: 3", | ||
"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", | ||
] | ||
requires-python = ">=3.8" | ||
description = "A small library that versions your Python projects." | ||
readme = "README.rst" | ||
dependencies = [ | ||
"setuptools >= 61.0", | ||
"tomli; python_version < '3.11'", | ||
] | ||
|
||
[project.optional-dependencies] | ||
scripts = [ | ||
"click>=6.0", | ||
] | ||
mypy = [ | ||
"mypy==0.812", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/twisted/incremental" | ||
Documentation = "https://twisted.org/incremental/docs/" | ||
Issues = "https://github.com/twisted/incremental/issues" | ||
Changelog = "https://github.com/twisted/incremental/blob/trunk/NEWS.rst" | ||
|
||
[project.entry-points."distutils.setup_keywords"] | ||
use_incremental = "incremental:_get_distutils_version" | ||
[project.entry-points."setuptools.finalize_distribution_options"] | ||
incremental = "incremental:_get_setuptools_version" | ||
|
||
[tool.incremental] | ||
|
||
[tool.black] | ||
target-version = ['py36', 'py37', 'py38'] | ||
|
@@ -12,3 +60,4 @@ target-version = ['py36', 'py37', 'py38'] | |
filename = "NEWS.rst" | ||
package_dir = "src/" | ||
package = "incremental" | ||
issue_format = "`#{issue} <https://github.com/twisted/incremental/issues/{issue}>`__" |
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,48 +1,3 @@ | ||
[metadata] | ||
name = incremental | ||
version = attr: incremental._setuptools_version | ||
maintainer = Amber Brown | ||
maintainer_email = [email protected] | ||
url = https://github.com/twisted/incremental | ||
classifiers = | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: MIT License | ||
Programming Language :: Python :: 3 | ||
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 | ||
license = MIT | ||
description = "A small library that versions your Python projects." | ||
long_description = file: README.rst | ||
install_requires = | ||
setuptools | ||
|
||
[options] | ||
packages = find: | ||
package_dir = =src | ||
zip_safe = False | ||
|
||
[options.packages.find] | ||
where = src | ||
exclude = exampleproj | ||
|
||
[options.package_data] | ||
incremental = py.typed | ||
|
||
[options.entry_points] | ||
distutils.setup_keywords = | ||
use_incremental = incremental:_get_version | ||
|
||
[options.extras_require] | ||
scripts = | ||
click>=6.0 | ||
twisted>=16.4.0 | ||
mypy = | ||
%(scripts)s | ||
mypy==0.812 | ||
|
||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.