-
Notifications
You must be signed in to change notification settings - Fork 31
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 #76 from testing-cabal/pyproject.toml
Migrate Python config to pyproject.toml
- Loading branch information
Showing
8 changed files
with
79 additions
and
95 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,7 +1,67 @@ | ||
[build-system] | ||
requires = ["setuptools>=43.0.0"] | ||
requires = ["setuptools>=61.2", "testtools", "iso8601"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
target-version = "py37" | ||
|
||
[project] | ||
name = "python-subunit" | ||
description = "Python implementation of subunit test streaming protocol" | ||
readme = "README.rst" | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"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", | ||
"Topic :: Software Development :: Testing", | ||
] | ||
keywords = ["python", "test", "streaming"] | ||
authors = [{name = "Robert Collins", email = "subunit-dev@lists.launchpad.net"}] | ||
license = {text = "Apache-2.0 or BSD"} | ||
dependencies = [ | ||
"iso8601", | ||
"testtools>=0.9.34", | ||
] | ||
requires-python = ">=3.8" | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "http://launchpad.net/subunit" | ||
"Bug Tracker" = "https://bugs.launchpad.net/subunit" | ||
"Source Code" = "https://github.com/testing-cabal/subunit/" | ||
|
||
[project.optional-dependencies] | ||
"docs" = ["docutils"] | ||
"test" = ["fixtures", "testscenarios", "hypothesis"] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["python"] | ||
include = ["subunit*"] | ||
|
||
[project.scripts] | ||
"subunit-1to2" = "subunit.filter_scripts.subunit_1to2:main" | ||
"subunit-2to1" = "subunit.filter_scripts.subunit_2to1:main" | ||
"subunit-filter" = "subunit.filter_scripts.subunit_filter:main" | ||
"subunit-ls" = "subunit.filter_scripts.subunit_ls:main" | ||
"subunit-notify" = "subunit.filter_scripts.subunit_notify:main" | ||
"subunit-output" = "subunit.filter_scripts.subunit_output:main" | ||
"subunit-stats" = "subunit.filter_scripts.subunit_stats:main" | ||
"subunit-tags" = "subunit.filter_scripts.subunit_tags:main" | ||
"subunit2csv" = "subunit.filter_scripts.subunit2csv:main" | ||
"subunit2disk" = "subunit.filter_scripts.subunit2disk:main" | ||
"subunit2gtk" = "subunit.filter_scripts.subunit2gtk:main" | ||
"subunit2junitxml" = "subunit.filter_scripts.subunit2junitxml:main" | ||
"subunit2pyunit" = "subunit.filter_scripts.subunit2pyunit:main" | ||
"tap2subunit" = "subunit.filter_scripts.tap2subunit:main" | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "subunit.version_string"} | ||
|
||
[tool.setuptools] | ||
license-files = ["COPYING"] |
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
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,90 +1,5 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os.path | ||
|
||
from setuptools import setup | ||
|
||
|
||
def _get_version_from_file(filename, start_of_line, split_marker): | ||
"""Extract version from file, giving last matching value or None""" | ||
try: | ||
return [x for x in open(filename) if x.startswith(start_of_line)][-1].split(split_marker)[1].strip() | ||
except (IOError, IndexError): | ||
return None | ||
|
||
|
||
VERSION = ( | ||
# Assume we are in a distribution, which has PKG-INFO | ||
_get_version_from_file("PKG-INFO", "Version:", ":") | ||
# Must be a development checkout, so use the Makefile | ||
or _get_version_from_file("Makefile", "VERSION", "=") | ||
or "0.0" | ||
) | ||
|
||
|
||
relpath = os.path.dirname(__file__) | ||
if relpath: | ||
os.chdir(relpath) | ||
|
||
setup( | ||
name="python-subunit", | ||
version=VERSION, | ||
description=("Python implementation of subunit test streaming protocol"), | ||
long_description=open("README.rst").read(), | ||
classifiers=[ | ||
"Intended Audience :: Developers", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"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", | ||
"Topic :: Software Development :: Testing", | ||
], | ||
keywords="python test streaming", | ||
author="Robert Collins", | ||
author_email="subunit-dev@lists.launchpad.net", | ||
url="http://launchpad.net/subunit", | ||
license="Apache-2.0 or BSD", | ||
project_urls={ | ||
"Bug Tracker": "https://bugs.launchpad.net/subunit", | ||
"Source Code": "https://github.com/testing-cabal/subunit/", | ||
}, | ||
packages=["subunit", "subunit.tests", "subunit.filter_scripts"], | ||
package_dir={"subunit": "python/subunit"}, | ||
python_requires=">=3.7", | ||
install_requires=[ | ||
"iso8601", | ||
"testtools>=0.9.34", | ||
], | ||
entry_points={ | ||
"console_scripts": [ | ||
"subunit-1to2=subunit.filter_scripts.subunit_1to2:main", | ||
"subunit-2to1=subunit.filter_scripts.subunit_2to1:main", | ||
"subunit-filter=subunit.filter_scripts.subunit_filter:main", | ||
"subunit-ls=subunit.filter_scripts.subunit_ls:main", | ||
"subunit-notify=subunit.filter_scripts.subunit_notify:main", | ||
"subunit-output=subunit.filter_scripts.subunit_output:main", | ||
"subunit-stats=subunit.filter_scripts.subunit_stats:main", | ||
"subunit-tags=subunit.filter_scripts.subunit_tags:main", | ||
"subunit2csv=subunit.filter_scripts.subunit2csv:main", | ||
"subunit2disk=subunit.filter_scripts.subunit2disk:main", | ||
"subunit2gtk=subunit.filter_scripts.subunit2gtk:main", | ||
"subunit2junitxml=subunit.filter_scripts.subunit2junitxml:main", | ||
"subunit2pyunit=subunit.filter_scripts.subunit2pyunit:main", | ||
"tap2subunit=subunit.filter_scripts.tap2subunit:main", | ||
] | ||
}, | ||
tests_require=[ | ||
"fixtures", | ||
"hypothesis", | ||
"testscenarios", | ||
], | ||
extras_require={ | ||
"docs": ["docutils"], | ||
"test": ["fixtures", "testscenarios", "hypothesis"], | ||
}, | ||
) | ||
setup() |