Skip to content

Commit d7a49fd

Browse files
committed
Makefile: check-python3 is unneeded, call python3 explictly.
the "dist", "clean", and "release-test" targets don't need a virtualenv so as long as there is a python3 on the PATH they will work
1 parent c972913 commit d7a49fd

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

Makefile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,15 @@ dev: install-dep
7272
## dist : create a module package for distribution
7373
dist: dist/${MODULE}-$(VERSION).tar.gz
7474

75-
check-python3:
76-
# Check that the default python version is python 3
77-
python --version 2>&1 | grep "Python 3"
78-
79-
dist/${MODULE}-$(VERSION).tar.gz: check-python3 $(SOURCES)
80-
python -m build
75+
dist/${MODULE}-$(VERSION).tar.gz: $(SOURCES)
76+
python3 -m build
8177

8278
## docs : make the docs
8379
docs: FORCE
8480
cd docs && $(MAKE) html
8581

8682
## clean : clean up all temporary / machine-generated files
87-
clean: check-python3 FORCE
83+
clean: FORCE
8884
rm -f ${MODULE}/*.pyc tests/*.pyc *.so ${MODULE}/*.so cwltool/cwlprov/*.so
8985
rm -Rf ${MODULE}/__pycache__/
9086
rm -Rf build
@@ -163,12 +159,12 @@ diff-cover.html: coverage.xml
163159
diff-cover --compare-branch=main $^ --html-report $@
164160

165161
## test : run the cwltool test suite
166-
test: check-python3 $(PYSOURCES)
167-
python -m pytest -rs ${PYTEST_EXTRA}
162+
test: $(PYSOURCES)
163+
python3 -m pytest -rs ${PYTEST_EXTRA}
168164

169165
## testcov : run the cwltool test suite and collect coverage
170-
testcov: check-python3 $(PYSOURCES)
171-
python -m pytest -rs --cov --cov-config=.coveragerc --cov-report= ${PYTEST_EXTRA}
166+
testcov: $(PYSOURCES)
167+
python3 -m pytest -rs --cov --cov-config=.coveragerc --cov-report= ${PYTEST_EXTRA}
172168

173169
sloccount.sc: $(PYSOURCES) Makefile
174170
sloccount --duplicates --wide --details $^ > $@
@@ -197,7 +193,7 @@ pyupgrade: $(PYSOURCES)
197193
pyupgrade --exit-zero-even-if-changed --py38-plus $^
198194
auto-walrus $^
199195

200-
release-test: check-python3 FORCE
196+
release-test: FORCE
201197
git diff-index --quiet HEAD -- || ( echo You have uncommitted changes, please commit them and try again; false )
202198
./release-test.sh
203199

@@ -206,7 +202,7 @@ release:
206202
./release-test.sh && \
207203
. testenv2/bin/activate && \
208204
pip install build && \
209-
python -m build testenv2/src/${MODULE} && \
205+
python3 -m build testenv2/src/${MODULE} && \
210206
pip install twine && \
211207
twine upload testenv2/src/${MODULE}/dist/* && \
212208
git tag ${VERSION} && git push --tags

0 commit comments

Comments
 (0)