Skip to content

Commit ffed6d8

Browse files
committed
update release script for Python3.9 compat
1 parent 3b05d04 commit ffed6d8

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ install: FORCE
6060
dist: dist/${MODULE}-$(VERSION).tar.gz
6161

6262
dist/${MODULE}-$(VERSION).tar.gz: $(SOURCES)
63-
./setup.py sdist bdist_wheel
63+
python setup.py sdist bdist_wheel
6464

6565
## clean : clean up all temporary / machine-generated files
6666
clean: FORCE
6767
rm -f ${MODILE}/*.pyc tests/*.pyc
68-
./setup.py clean --all || true
68+
python setup.py clean --all || true
6969
rm -Rf .coverage
7070
rm -f diff-cover.html
7171

@@ -125,7 +125,7 @@ diff-cover.html: coverage-gcovr.xml coverage.xml
125125

126126
## test : run the ${MODULE} test suite
127127
test: all
128-
./setup.py test
128+
python setup.py test
129129

130130
sloccount.sc: ${PYSOURCES} Makefile
131131
sloccount --duplicates --wide --details $^ > $@

release-test.sh

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,79 @@
33
set -e
44
set -x
55

6+
export LC_ALL=C
7+
68
package=cwltest
79
module=cwltest
810
slug=${TRAVIS_PULL_REQUEST_SLUG:=common-workflow-language/${module}}
911
repo=https://github.com/${slug}.git
1012
run_tests="bin/py.test --pyargs ${module}"
11-
pipver=18 # minimum required version of pip
12-
setupver=40.3 # minimum required version of setuptools
13-
PYVER=${PYVER:=3}
13+
pipver=20.3b1 # minimum required version of pip for Python 3.9
14+
setuptoolsver=41.1.0 # required for Python 3.9
1415

1516
rm -Rf "testenv${PYVER}_"? || /bin/true
1617

1718
export HEAD=${TRAVIS_PULL_REQUEST_SHA:-$(git rev-parse HEAD)}
1819

1920
if [ "${RELEASE_SKIP}" != "head" ]
2021
then
21-
virtualenv "testenv${PYVER}_1" -p "python${PYVER}"
22+
python3 -m venv testenv1
2223
# First we test the head
2324
# shellcheck source=/dev/null
24-
source "testenv${PYVER}_1/bin/activate"
25-
rm -f "testenv${PYVER}_1/lib/python-wheels/setuptools"*
26-
pip install --force-reinstall -U pip==${pipver}
27-
pip install setuptools==${setupver} wheel
25+
source testenv1/bin/activate
26+
rm -Rf testenv1/local
27+
rm -f testenv1/lib/python-wheels/setuptools* \
28+
&& pip install --force-reinstall -U pip==${pipver} \
29+
&& pip install setuptools==${setuptoolsver} wheel
2830
make install-dependencies
2931
make test
3032
pip uninstall -y ${package} || true; pip uninstall -y ${package} \
3133
|| true; make install
32-
mkdir "testenv${PYVER}_1/not-${module}"
34+
mkdir testenv1/not-${module}
3335
# if there is a subdir named '${module}' py.test will execute tests
3436
# there instead of the installed module's tests
35-
36-
pushd "testenv${PYVER}_1/not-${module}"
37+
pushd testenv1/not-${module}
3738
# shellcheck disable=SC2086
3839
../${run_tests}; popd
3940
fi
4041

41-
42-
virtualenv "testenv${PYVER}_2" -p "python${PYVER}"
43-
virtualenv "testenv${PYVER}_3" -p "python${PYVER}"
44-
virtualenv "testenv${PYVER}_4" -p "python${PYVER}"
45-
virtualenv "testenv${PYVER}_5" -p "python${PYVER}"
46-
42+
python3 -m venv testenv2
43+
python3 -m venv testenv3
44+
python3 -m venv testenv4
45+
python3 -m venv testenv5
46+
rm -Rf testenv[2345]/local
4747

4848
# Secondly we test via pip
4949

50-
pushd "testenv${PYVER}_2"
50+
pushd testenv2
5151
# shellcheck source=/dev/null
5252
source bin/activate
53-
rm lib/python-wheels/setuptools* \
53+
rm -f lib/python-wheels/setuptools* \
5454
&& pip install --force-reinstall -U pip==${pipver} \
55-
&& pip install setuptools==${setupver} wheel
55+
&& pip install setuptools==${setuptoolsver} wheel
5656
# The following can fail if you haven't pushed your commits to ${repo}
5757
pip install -e "git+${repo}@${HEAD}#egg=${package}"
5858
pushd src/${package}
5959
make install-dependencies
6060
make dist
6161
make test
62-
cp dist/${package}*tar.gz "../../../testenv${PYVER}_3/"
63-
cp dist/${module}*whl "../../../testenv${PYVER}_4/"
62+
cp dist/${package}*tar.gz ../../../testenv3/
63+
cp dist/${module}*whl ../../../testenv4/
6464
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
6565
popd # ../.. no subdir named ${proj} here, safe for py.testing the installed module
6666
# shellcheck disable=SC2086
6767
${run_tests}
6868
popd
6969

70-
# Is the source distribution in testenv${PYVER}_2 complete enough to build
70+
# Is the source distribution in testenv2 complete enough to build
7171
# another functional distribution?
7272

73-
pushd "testenv${PYVER}_3/"
73+
pushd testenv3/
7474
# shellcheck source=/dev/null
7575
source bin/activate
76-
rm lib/python-wheels/setuptools* \
76+
rm -f lib/python-wheels/setuptools* \
7777
&& pip install --force-reinstall -U pip==${pipver} \
78-
&& pip install setuptools==${setupver} wheel
78+
&& pip install setuptools==${setuptoolsver} wheel
7979
pip install ${package}*tar.gz
8080
pip install pytest\<5
8181
mkdir out
@@ -91,14 +91,14 @@ pushd ../not-${module}
9191
popd
9292
popd
9393

94-
# Is the wheel in testenv${PYVER}_2 installable and will it pass the tests
94+
# Is the wheel in testenv2 installable and will it pass the tests
9595

96-
pushd "testenv${PYVER}_4/"
96+
pushd testenv4/
9797
# shellcheck source=/dev/null
9898
source bin/activate
99-
rm lib/python-wheels/setuptools* \
99+
rm -f lib/python-wheels/setuptools* \
100100
&& pip install --force-reinstall -U pip==${pipver} \
101-
&& pip install setuptools==${setupver} wheel
101+
&& pip install setuptools==${setuptoolsver} wheel
102102
pip install ${module}*.whl
103103
pip install pytest\<5
104104
mkdir not-${module}

0 commit comments

Comments
 (0)