-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to pyproject.toml for setuptools data (#572)
This requires more modern versions of setuptools to build, but results in declarative metadata with fewer pieces of disparate config. The setup.py stub is kept for now to reduce the number of steps redistributors of nose2 will have to take to adapt. It can be removed in a subsequent release. Also, remove a defunct `graft` rule from `MANIFEST.in`. Apply a fix from pre-commit hooks.
- Loading branch information
Showing
5 changed files
with
68 additions
and
63 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
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,3 +1,62 @@ | ||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = [ | ||
"setuptools", | ||
] | ||
|
||
[project] | ||
name = "nose2" | ||
description = "unittest with plugins" | ||
readme = "README.rst" | ||
keywords= [ | ||
"testing", | ||
"tests", | ||
"unittest", | ||
] | ||
authors = [ | ||
{ name = "Stephen Rosen", email = "[email protected]" }, | ||
] | ||
requires-python = ">=3.6" | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Software Development :: Testing", | ||
] | ||
dynamic = [ | ||
"version", | ||
] | ||
[project.optional-dependencies] | ||
coverage_plugin = [ | ||
"coverage", | ||
] | ||
dev = [ | ||
"Sphinx", | ||
"sphinx-issues", | ||
"sphinx_rtd_theme", | ||
] | ||
[project.urls] | ||
changelog = "https://docs.nose2.io/en/latest/changelog.html" | ||
documentation = "https://docs.nose2.io/" | ||
repository = "https://github.com/nose-devs/nose2" | ||
[project.scripts] | ||
nose2 = "nose2:discover" | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "nose2.__version__"} | ||
|
||
[tool.ruff] | ||
select = [ | ||
"B", # flake8-bugbear | ||
|
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,61 +1,3 @@ | ||
import os | ||
import re | ||
from setuptools import setup | ||
|
||
from setuptools import find_packages, setup | ||
|
||
|
||
def read_version(filename): | ||
# use of " over ' will be enforced by "black" | ||
version_pattern = re.compile(r'__version__ = "([^"]*)"') | ||
with open(filename) as fp: | ||
for line in fp: | ||
m = version_pattern.match(line) | ||
if m: | ||
return m.group(1) | ||
raise Exception(f"could not parse version from {filename}") | ||
|
||
|
||
MAINTAINER = "Stephen Rosen" | ||
MAINTAINER_EMAIL = "[email protected]" | ||
|
||
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), "README.rst")).read() | ||
|
||
setup( | ||
name="nose2", | ||
version=read_version("nose2/__init__.py"), | ||
packages=find_packages(), | ||
extras_require={ | ||
"coverage_plugin": ["coverage"], | ||
"dev": [ | ||
"Sphinx", | ||
"sphinx_rtd_theme", | ||
"sphinx-issues", | ||
], | ||
}, | ||
entry_points={"console_scripts": ["nose2 = nose2:discover"]}, | ||
# descriptive package info below | ||
description="unittest2 with plugins, the successor to nose", | ||
long_description=LONG_DESCRIPTION, | ||
maintainer=MAINTAINER, | ||
maintainer_email=MAINTAINER_EMAIL, | ||
url="https://github.com/nose-devs/nose2", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Software Development :: Testing", | ||
], | ||
keywords=["unittest", "testing", "tests"], | ||
) | ||
setup() |