Skip to content

Commit 555a5b5

Browse files
committed
covert setup.py to setup.cfg
Thank you https://pypi.org/project/setuptools-py2cfg/ !
1 parent aade76a commit 555a5b5

File tree

8 files changed

+70
-82
lines changed

8 files changed

+70
-82
lines changed

.github/workflows/ci-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Upgrade setuptools and install tox
4747
run: |
4848
pip install -U pip setuptools wheel
49-
pip install "tox<4" "tox-gh-actions<3"
49+
pip install "tox>4,<5" "tox-gh-actions>3"
5050
5151
- name: MyPy cache
5252
if: ${{ matrix.step == 'mypy' }}
@@ -96,7 +96,7 @@ jobs:
9696
- name: Upgrade setuptools and install tox
9797
run: |
9898
pip install -U pip setuptools wheel
99-
pip install "tox<4" "tox-gh-actions<3"
99+
pip install "tox>4,<5" "tox-gh-actions>3"
100100
101101
- if: ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
102102
name: Create local branch for diff-quality for PRs

Makefile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ PACKAGE=cwltest
2525

2626
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2727
# `[[` conditional expressions.
28-
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py) setup.py
28+
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py)
2929
DEVPKGS=-rdev-requirements.txt -rtest-requirements.txt -rmypy-requirements.txt
3030
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
3131
python-flake8 python-mock shellcheck
@@ -75,7 +75,6 @@ docs: FORCE
7575
## clean : clean up all temporary / machine-generated files
7676
clean: FORCE
7777
rm -f ${MODILE}/*.pyc tests/*.pyc
78-
python setup.py clean --all || true
7978
rm -Rf .coverage\.* .coverage
8079
rm -f diff-cover.html
8180

@@ -93,7 +92,7 @@ pydocstyle: $(PYSOURCES)
9392
pydocstyle --add-ignore=D100,D101,D102,D103 $^ || true
9493

9594
pydocstyle_report.txt: $(PYSOURCES)
96-
pydocstyle setup.py $^ > $@ 2>&1 || true
95+
pydocstyle $^ > $@ 2>&1 || true
9796

9897
## diff_pydocstyle_report : check Python docstring style for changed files only
9998
diff_pydocstyle_report: pydocstyle_report.txt
@@ -104,11 +103,11 @@ codespell:
104103
codespell -w $(shell git ls-files | grep -v mypy-stubs | grep -v gitignore)
105104

106105
## format : check/fix all code indentation and formatting (runs black)
107-
format: $(PYSOURCES) mypy-stubs
108-
black --exclude cwltest/_version.py $^
106+
format: $(filter-out cwltest/_version.py,$(PYSOURCES)) mypy-stubs
107+
black $^
109108

110-
format-check: $(PYSOURCES) mypy-stubs
111-
black --diff --check --exclude cwltest/_version.py $^
109+
format-check: $(filter-out cwltest/_version.py,$(PYSOURCES)) mypy-stubs
110+
black --diff --check $^
112111

113112
## pylint : run static code analysis on Python code
114113
pylint: $(PYSOURCES)
@@ -165,7 +164,7 @@ list-author-emails:
165164
@git log --format='%aN,%aE' | sort -u | grep -v 'root'
166165

167166
mypy3: mypy
168-
mypy: $(filter-out setup.py,$(PYSOURCES))
167+
mypy: $(PYSOURCES)
169168
MYPYPATH=$$MYPYPATH:mypy-stubs mypy $^
170169

171170
pyupgrade: $(filter-out schema_salad/metaschema.py,$(PYSOURCES))

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Or from source
5858
.. code:: bash
5959
6060
git clone https://github.com/common-workflow-language/cwltest.git
61-
cd cwltest && python setup.py install
61+
cd cwltest && pip install .
6262
6363
***********************
6464
Run on the command line

dev-requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ pylint
44
pep257
55
pydocstyle
66
flake8
7-
tox < 5
8-
tox-pyenv
7+
tox >4, < 5
8+
virtualenv-pyenv
99
isort
1010
wheel
1111
autoflake
1212
flake8-bugbear
1313
pyupgrade
1414
bandit
1515
auto-walrus
16+
build

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=45",
4+
"setuptools_scm[toml]>=8.0.4,<9",
5+
]
6+
build-backend = "setuptools.build_meta"
7+
8+
[tool.setuptools_scm]
9+
write_to = "cwltest/_version.py"

setup.cfg

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,54 @@
11
[aliases]
2-
test=pytest
2+
test = pytest
3+
4+
[metadata]
5+
name = cwltest
6+
author = Common workflow language working group
7+
author_email = [email protected]
8+
license = Apache 2.0
9+
description = Common Workflow Language testing framework
10+
url = https://github.com/common-workflow-language/cwltest
11+
download_url = https://github.com/common-workflow-language/cwltest
12+
long_description = file: README.rst
13+
long_description_content_type = text/x-rst
14+
classifiers =
15+
Environment :: Console
16+
License :: OSI Approved :: Apache Software License
17+
Operating System :: POSIX
18+
Operating System :: MacOS :: MacOS X
19+
Development Status :: 5 - Production/Stable
20+
Programming Language :: Python :: 3.8
21+
Programming Language :: Python :: 3.9
22+
Programming Language :: Python :: 3.10
23+
Programming Language :: Python :: 3.11
24+
Programming Language :: Python :: 3.12
25+
Typing :: Typed
26+
27+
[options]
28+
package_dir =
29+
cwltest.tests = tests
30+
packages = cwltest, cwltest.tests
31+
zip_safe = True
32+
setup_requires = setuptools_scm>=8.0.4,<9
33+
install_requires = file: requirements.txt
34+
include_package_data = True
35+
python_requires = >=3.8,<3.13
36+
test_suite = tests
337

438
[tool:isort]
539
multi_line_output = 3
640
include_trailing_comma = True
741
force_grid_wrap = 0
842
use_parentheses = True
943
line_length = 88
44+
45+
[options.entry_points]
46+
console_scripts = cwltest=cwltest.main:main
47+
pytest11 = cwl = cwltest.plugin [pytest-plugin]
48+
49+
[options.extras_require]
50+
pytest-plugin = pytest
51+
52+
[options.package_data]
53+
cwltest = py.typed
54+
tests = test-data/*

setup.py

Lines changed: 0 additions & 66 deletions
This file was deleted.

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ envlist =
88
py312-pydocstyle
99

1010
skip_missing_interpreters = True
11+
isolated_build = True
1112

1213
[pytest]
1314
addopts = -p pytester -n auto
@@ -46,13 +47,12 @@ deps =
4647
py3{8,9,10,11,12}-bandit: bandit
4748
py3{8,9,10,11,12}-mypy: -rmypy-requirements.txt
4849

49-
setenv =
50+
set_env =
5051
py3{8,3,10,11,12}-unit: LC_ALL = C.UTF-8
5152
COV_CORE_SOURCE=cwltest
5253
COV_CORE_CONFIG={toxinidir}/.coveragerc
5354
COV_CORE_DATAFILE={toxinidir}/.coverage.eager
5455

55-
5656
commands =
5757
py3{8,9,10,11,12}-unit: python -m pip install -U pip setuptools wheel
5858
py3{8,9,10,11,12}-unit: python -m pytest --cov --cov-config={toxinidir}/.coveragerc --cov-append {posargs}

0 commit comments

Comments
 (0)