diff --git a/.circleci/config.yml b/.circleci/config.yml index d243ef6..f97fa6f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,6 +33,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e pypy3-nose2 @@ -49,6 +58,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e pypy3-pytest3 @@ -65,6 +83,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e pypy3-unit @@ -81,6 +108,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e pypy3-unit2 @@ -97,6 +133,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py37-nose @@ -113,6 +158,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py37-nose2 @@ -129,6 +183,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py37-pytest3 @@ -145,6 +208,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py37-unit @@ -161,6 +233,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py37-unit2 @@ -177,6 +258,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py38-nose @@ -193,6 +283,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py38-nose2 @@ -209,6 +308,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py38-pytest3 @@ -225,6 +333,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py38-unit @@ -241,6 +358,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py38-unit2 @@ -257,6 +383,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py39-nose @@ -273,6 +408,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py39-nose2 @@ -289,6 +433,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py39-pytest3 @@ -305,6 +458,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py39-unit @@ -321,6 +483,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py39-unit2 @@ -337,6 +508,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py310-unit @@ -353,6 +533,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py310-nose2 @@ -369,6 +558,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py311-unit @@ -385,6 +583,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e py311-nose2 @@ -419,4 +626,4 @@ workflows: - test-py311-nose2 # !!! WARNING !!! # This file is automatically generated by ../rebuild-circleci-yaml -# !!! WARNING !!! \ No newline at end of file +# !!! WARNING !!! diff --git a/.gitignore b/.gitignore index 5d738fc..e6cf1de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +parameterized/version.py + *.class *.o *.pyc diff --git a/parameterized/__init__.py b/parameterized/__init__.py index 9dae02d..df322a1 100644 --- a/parameterized/__init__.py +++ b/parameterized/__init__.py @@ -1,3 +1,3 @@ from .parameterized import parameterized, param, parameterized_class -__version__ = "0.9.0" +from .version import __version__ diff --git a/pyproject.toml b/pyproject.toml index 6281ecf..a9e259f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,12 +21,12 @@ include-package-data = false [tool.setuptools.packages] find = {namespaces = false} -[tool.setuptools.dynamic] -version = {attr = "parameterized.__version__"} +[tool.setuptools_scm] +write_to = "parameterized/version.py" [tool.distutils.bdist_wheel] universal = 1 [build-system] -requires = ["setuptools>=61.2"] -build-backend = "setuptools.build_meta" \ No newline at end of file +requires = ["setuptools>=61.2", "setuptools_scm[toml]>=7.0"] +build-backend = "setuptools.build_meta" diff --git a/rebuild-circleci-yaml b/rebuild-circleci-yaml index 1e7694e..b5c4d2d 100755 --- a/rebuild-circleci-yaml +++ b/rebuild-circleci-yaml @@ -31,6 +31,15 @@ jobs: - run: name: install tox command: pip install tox + - run: + name: install build deps + command: pip install --upgrade setuptools setuptools_scm wheel build + - run: + name: build package + command: python3 -m build -nwx . + - run: + name: install package + command: pip install --upgrade ./dist/*.whl - run: name: run tests command: tox -e {{ tox_env }} @@ -63,10 +72,9 @@ py_version_map = { } def main(): - env_list_bytes = sp.check_output("tox --listenvs", shell=True).splitlines() + env_list_raw = sp.check_output("tox --listenvs", shell=True).decode("utf-8").splitlines() env_list = [] - for env_bytes in env_list_bytes: - env = env_bytes.decode("utf-8") + for env in env_list_raw: if not env.strip(): continue py_ver, _, _ = env.partition("-")