diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 552dbde..e083653 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install testtools pbr ruff + python -m pip install testtools ruff - name: Run ruff run: | python -m ruff check . diff --git a/.gitignore b/.gitignore index 69c8eef..bb54aef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ TAGS tags lib/testtools -MANIFEST build dist *~ @@ -11,5 +10,5 @@ testscenarios.egg-info *.pyc __pycache__ *.egg -ChangeLog -AUTHORS +testscenarios/_version.py +tox.ini diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 0edefa1..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,10 +0,0 @@ -include .bzrignore -include Apache-2.0 -include BSD -include COPYING -include GOALS -include HACKING -include MANIFEST.in -include Makefile -include NEWS -include doc/*.py diff --git a/Makefile b/Makefile index 859ad70..f13344d 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,4 @@ TAGS: testscenarios/*.py testscenarios/tests/*.py tags: testscenarios/*.py testscenarios/tests/*.py ctags -R testscenarios/ -release: - python setup.py sdist bdist_wheel upload -s - -.PHONY: all check release +.PHONY: all check diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c002daa --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,60 @@ +[build-system] +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + +[project] +name = "testscenarios" +description = "Testscenarios, a pyunit extension for dependency injection" +readme = "README.rst" +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "License :: OSI Approved :: Apache Software License", + "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", + "Programming Language :: Python :: 3.13", + "Topic :: Software Development :: Quality Assurance", + "Topic :: Software Development :: Testing", +] +authors = [{name = "Testing-cabal", email = "testing-cabal@lists.launchpad.net"}] +license = {text = "Apache-2.0 or BSD"} +requires-python = ">=3.8" +dynamic = ["version"] + +[project.urls] +Homepage = "https://launchpad.net/testscenarios" +"Bug Tracker" = "https://bugs.launchpad.net/testscenarios" +"Source Code" = "https://github.com/testing-cabal/testscenarios" + +[project.optional-dependencies] +"test" = ["testtools"] + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "testscenarios/_version.py" + +[tool.hatch.build.targets.sdist] +include = [ + "testscenarios*", + "APACHE-2.0", + "AUTHORS", + "BSD", + "ChangeLog", + "COPYING", + "GOALS", + "HACKING", + "Makefile", + "NEWS", + "README.rst", + "tox.ini", + "doc/*.py", + ] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e1e5a1b..04da15e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -pbr >= 0.11 testtools diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index eaf9018..0000000 --- a/setup.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[metadata] -name = testscenarios -summary = Testscenarios, a pyunit extension for dependency injection -description_file = README.rst -author = Testing-cabal -author_email = testing-cabal@lists.launchpad.net -home_page = https://launchpad.net/testscenarios -classifier = - Development Status :: 6 - Mature - Intended Audience :: Developers - License :: OSI Approved :: BSD License - License :: OSI Approved :: Apache Software License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Topic :: Software Development :: Quality Assurance - Topic :: Software Development :: Testing - -[options] -python_requires = >=3.8 - -[test] -test_module = testscenarios.tests diff --git a/setup.py b/setup.py deleted file mode 100755 index ed58d0f..0000000 --- a/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python -import setuptools - -setuptools.setup( - setup_requires=['pbr'], - pbr=True) diff --git a/testscenarios/__init__.py b/testscenarios/__init__.py index ab68ba9..e5f6780 100644 --- a/testscenarios/__init__.py +++ b/testscenarios/__init__.py @@ -27,21 +27,7 @@ methods for details. """ -# same format as sys.version_info: "A tuple containing the five components of -# the version number: major, minor, micro, releaselevel, and serial. All -# values except releaselevel are integers; the release level is 'alpha', -# 'beta', 'candidate', or 'final'. The version_info value corresponding to the -# Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a -# releaselevel of 'dev' for unreleased under-development code. -# -# If the releaselevel is 'alpha' then the major/minor/micro components are not -# established at this point, and setup.py will use a version of next-$(revno). -# If the releaselevel is 'final', then the tarball will be major.minor.micro. -# Otherwise it is major.minor.micro~$(revno). -from pbr.version import VersionInfo -_version = VersionInfo('testscenarios') -__version__ = _version.semantic_version().version_tuple() -version = _version.release_string() +from testscenarios._version import __version__ __all__ = [ 'TestWithScenarios', @@ -52,6 +38,7 @@ 'load_tests_apply_scenarios', 'multiply_scenarios', 'per_module_scenarios', + '__version__', ]