@@ -28,7 +28,7 @@ EXTRAS=
2828# `[[` conditional expressions.
2929PYSOURCES =$(wildcard cwlupgrader/** .py tests/* .py) setup.py
3030DEVPKGS =diff_cover black pylint pep257 pydocstyle flake8 tox tox-pyenv \
31- isort wheel autoflake flake8-bugbear pyupgrade bandit \
31+ isort wheel autoflake flake8-bugbear pyupgrade bandit build \
3232 -rtest-requirements.txt -rmypy-requirements.txt
3333DEBDEVPKGS =pylint python3-coverage sloccount \
3434 python3-flake8 shellcheck
@@ -57,13 +57,14 @@ install: FORCE
5757
5858# # dev : install the cwlupgrader package in dev mode
5959dev : install-dep
60+ pip install -U pip setuptools wheel
6061 pip install -e .$(EXTRAS )
6162
6263# # dist : create a module package for distribution
6364dist : dist/${MODULE}-$(VERSION ) .tar.gz
6465
6566dist/${MODULE}-$(VERSION ) .tar.gz : $(SOURCES )
66- python setup.py sdist bdist_wheel
67+ python -m build
6768
6869# # clean : clean up all temporary / machine-generated files
6970clean : FORCE
@@ -74,7 +75,7 @@ clean: FORCE
7475
7576# Linting and code style related targets
7677# # sort_import : sorting imports using isort: https://github.com/timothycrosley/isort
77- sort_imports : $(PYSOURCES )
78+ sort_imports : $(PYSOURCES ) mypy-stubs
7879 isort $^
7980
8081remove_unused_imports : $(PYSOURCES )
@@ -98,10 +99,10 @@ codespell:
9899
99100# # format : check/fix all code indentation and formatting (runs black)
100101format :
101- black setup.py cwlupgrader tests
102+ black setup.py cwlupgrader tests mypy-stubs
102103
103104format-check :
104- black --diff --check cwlupgrader setup.py
105+ black --diff --check cwlupgrader setup.py mypy-stubs
105106
106107# # pylint : run static code analysis on Python code
107108pylint : $(PYSOURCES )
@@ -136,11 +137,11 @@ diff-cover: coverage.xml
136137 diff-cover --compare-branch=main $^
137138
138139diff-cover.html : coverage.xml
139- diff-cover --compare-branch main $^ --html-report $@
140+ diff-cover --compare-branch= main $^ --html-report $@
140141
141142# # test : run the cwlupgrader test suite
142143test : $(PYSOURCES )
143- python -m pytest -rs
144+ python -m pytest -rs ${PYTEST_EXTRA}
144145
145146# # testcov : run the cwlupgrader test suite and collect coverage
146147testcov : $(PYSOURCES )
@@ -187,8 +188,8 @@ release: release-test
187188 twine upload testenv2/src/${MODULE} /dist/* && \
188189 git tag v${VERSION} && git push --tags
189190
190- flake8 : $( PYSOURCES )
191- flake8 $^
191+ flake8 : FORCE
192+ flake8 $( PYSOURCES )
192193
193194FORCE :
194195
0 commit comments