Skip to content

Commit ca22197

Browse files
authored
Merge pull request #58 from common-workflow-language/split_wheel
Split wheel into py2 & py3
2 parents a99e17e + ab93b5d commit ca22197

File tree

4 files changed

+35
-19
lines changed

4 files changed

+35
-19
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ install: FORCE
5858
dist: dist/${MODULE}-$(VERSION).tar.gz
5959

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

6363
## clean : clean up all temporary / machine-generated files
6464
clean: FORCE
@@ -170,11 +170,12 @@ mypy3: ${PYSOURCES}
170170
release: FORCE
171171
PYVER=2.7 ./release-test.sh
172172
PYVER=3 ./release-test.sh
173-
. testenv2/bin/activate && \
174-
testenv2/src/${MODULE}/setup.py sdist bdist_wheel
175-
. testenv2/bin/activate && \
173+
. testenv2.7_2/bin/activate && \
174+
testenv2.7_2/src/${MODULE}/setup.py sdist bdist_wheel
175+
. testenv2.7_2/bin/activate && \
176176
pip install twine && \
177-
twine upload testenv2/src/${MODULE}/dist/* && \
177+
twine upload testenv2.7_2/src/${MODULE}/dist/* \
178+
testenv3_2/src/${MODULE}/dist/*whl && \
178179
git tag ${VERSION} && git push --tags
179180

180181
FORCE:

release-test.sh

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ virtualenv testenv${PYVER}_1 -p python${PYVER}
1818
virtualenv testenv${PYVER}_2 -p python${PYVER}
1919
virtualenv testenv${PYVER}_3 -p python${PYVER}
2020
virtualenv testenv${PYVER}_4 -p python${PYVER}
21+
virtualenv testenv${PYVER}_5 -p python${PYVER}
2122

2223
# First we test the head
2324
source testenv${PYVER}_1/bin/activate
@@ -35,25 +36,27 @@ pushd testenv${PYVER}_1/not-${module}; ../bin/${run_tests}; popd
3536

3637
# Secondly we test via pip
3738

38-
cd testenv${PYVER}_2
39+
pushd testenv${PYVER}_2
3940
source bin/activate
4041
rm lib/python-wheels/setuptools* \
4142
&& pip install --force-reinstall -U pip==${pipver} \
4243
&& pip install setuptools==${setupver} wheel
4344
pip install -e git+${repo}@${HEAD}#egg=${package}
44-
cd src/${package}
45+
pushd src/${package}
4546
make install-dependencies
4647
make dist
4748
make test
4849
cp dist/${package}*tar.gz ../../../testenv${PYVER}_3/
50+
cp dist/${package}*whl ../../../testenv${PYVER}_4/
4951
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
50-
cd ../.. # no subdir named ${proj} here, safe for py.testing the installed module
52+
popd # ../.. no subdir named ${proj} here, safe for py.testing the installed module
5153
bin/${run_tests}
54+
popd
5255

53-
# Is the distribution in testenv${PYVER}_2 complete enough to build another
54-
# functional distribution?
56+
# Is the source distribution in testenv${PYVER}_2 complete enough to build
57+
# another functional distribution?
5558

56-
cd ../testenv${PYVER}_3/
59+
pushd testenv${PYVER}_3/
5760
source bin/activate
5861
rm lib/python-wheels/setuptools* \
5962
&& pip install --force-reinstall -U pip==${pipver} \
@@ -62,9 +65,24 @@ pip install ${package}*tar.gz
6265
pip install pytest
6366
mkdir out
6467
tar --extract --directory=out -z -f ${package}*.tar.gz
65-
cd out/${package}*
68+
pushd out/${package}*
6669
make dist
6770
make test
6871
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
6972
mkdir ../not-${module}
7073
pushd ../not-${module} ; ../../bin/${run_tests}; popd
74+
popd
75+
popd
76+
77+
# Is the wheel in testenv${PYVER}_2 installable and will it pass the tests
78+
79+
pushd testenv${PYVER}_4/
80+
source bin/activate
81+
rm lib/python-wheels/setuptools* \
82+
&& pip install --force-reinstall -U pip==${pipver} \
83+
&& pip install setuptools==${setupver} wheel
84+
pip install ${package}*.whl
85+
pip install pytest
86+
mkdir not-${module}
87+
pushd not-${module} ; ../bin/${run_tests}; popd
88+
popd

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ignore = E124,E128,E129,E201,E202,E225,E226,E231,E265,E271,E302,E303,F401,E402,E
44
[easy_install]
55

66
[bdist_wheel]
7-
universal = 1
7+
universal = 0
88

99
[tool:pytest]
1010
testpaths = tests

setup.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@
2525
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
2626
pytest_runner = ['pytest-runner'] if needs_pytest else []
2727

28-
if sys.version_info.major == 2:
29-
install_requires.extend(['futures >= 3.0.5', 'subprocess32'])
30-
31-
if sys.version_info[:2] < (3, 5):
32-
install_requires.append('typing >= 3.5.2')
33-
3428
setup(name='cwltest',
3529
version='1.0',
3630
description='Common workflow language testing framework',
@@ -52,4 +46,7 @@
5246
},
5347
zip_safe=True,
5448
cmdclass={'egg_info': tagger},
49+
extras_require={':python_version<"3"': [
50+
'futures >= 3.0.5', 'subprocess32'],
51+
':python_version<"3.5"': ['typing >= 3.5.2'] }
5552
)

0 commit comments

Comments
 (0)