diff --git a/Makefile b/Makefile index 002aee7..3559410 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ install: FORCE dist: dist/${MODULE}-$(VERSION).tar.gz dist/${MODULE}-$(VERSION).tar.gz: $(SOURCES) - ./setup.py sdist + ./setup.py sdist bdist_wheel ## clean : clean up all temporary / machine-generated files clean: FORCE @@ -170,11 +170,12 @@ mypy3: ${PYSOURCES} release: FORCE PYVER=2.7 ./release-test.sh PYVER=3 ./release-test.sh - . testenv2/bin/activate && \ - testenv2/src/${MODULE}/setup.py sdist bdist_wheel - . testenv2/bin/activate && \ + . testenv2.7_2/bin/activate && \ + testenv2.7_2/src/${MODULE}/setup.py sdist bdist_wheel + . testenv2.7_2/bin/activate && \ pip install twine && \ - twine upload testenv2/src/${MODULE}/dist/* && \ + twine upload testenv2.7_2/src/${MODULE}/dist/* \ + testenv3_2/src/${MODULE}/dist/*whl && \ git tag ${VERSION} && git push --tags FORCE: diff --git a/release-test.sh b/release-test.sh index 27c6768..f295ab9 100755 --- a/release-test.sh +++ b/release-test.sh @@ -18,6 +18,7 @@ virtualenv testenv${PYVER}_1 -p python${PYVER} virtualenv testenv${PYVER}_2 -p python${PYVER} virtualenv testenv${PYVER}_3 -p python${PYVER} virtualenv testenv${PYVER}_4 -p python${PYVER} +virtualenv testenv${PYVER}_5 -p python${PYVER} # First we test the head source testenv${PYVER}_1/bin/activate @@ -35,25 +36,27 @@ pushd testenv${PYVER}_1/not-${module}; ../bin/${run_tests}; popd # Secondly we test via pip -cd testenv${PYVER}_2 +pushd testenv${PYVER}_2 source bin/activate rm lib/python-wheels/setuptools* \ && pip install --force-reinstall -U pip==${pipver} \ && pip install setuptools==${setupver} wheel pip install -e git+${repo}@${HEAD}#egg=${package} -cd src/${package} +pushd src/${package} make install-dependencies make dist make test cp dist/${package}*tar.gz ../../../testenv${PYVER}_3/ +cp dist/${package}*whl ../../../testenv${PYVER}_4/ pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install -cd ../.. # no subdir named ${proj} here, safe for py.testing the installed module +popd # ../.. no subdir named ${proj} here, safe for py.testing the installed module bin/${run_tests} +popd -# Is the distribution in testenv${PYVER}_2 complete enough to build another -# functional distribution? +# Is the source distribution in testenv${PYVER}_2 complete enough to build +# another functional distribution? -cd ../testenv${PYVER}_3/ +pushd testenv${PYVER}_3/ source bin/activate rm lib/python-wheels/setuptools* \ && pip install --force-reinstall -U pip==${pipver} \ @@ -62,9 +65,24 @@ pip install ${package}*tar.gz pip install pytest mkdir out tar --extract --directory=out -z -f ${package}*.tar.gz -cd out/${package}* +pushd out/${package}* make dist make test pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install mkdir ../not-${module} pushd ../not-${module} ; ../../bin/${run_tests}; popd +popd +popd + +# Is the wheel in testenv${PYVER}_2 installable and will it pass the tests + +pushd testenv${PYVER}_4/ +source bin/activate +rm lib/python-wheels/setuptools* \ + && pip install --force-reinstall -U pip==${pipver} \ + && pip install setuptools==${setupver} wheel +pip install ${package}*.whl +pip install pytest +mkdir not-${module} +pushd not-${module} ; ../bin/${run_tests}; popd +popd diff --git a/setup.cfg b/setup.cfg index 903a610..4d2c12b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,7 @@ ignore = E124,E128,E129,E201,E202,E225,E226,E231,E265,E271,E302,E303,F401,E402,E [easy_install] [bdist_wheel] -universal = 1 +universal = 0 [tool:pytest] testpaths = tests diff --git a/setup.py b/setup.py index 0c05388..992f055 100755 --- a/setup.py +++ b/setup.py @@ -25,12 +25,6 @@ needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] -if sys.version_info.major == 2: - install_requires.extend(['futures >= 3.0.5', 'subprocess32']) - -if sys.version_info[:2] < (3, 5): - install_requires.append('typing >= 3.5.2') - setup(name='cwltest', version='1.0', description='Common workflow language testing framework', @@ -52,4 +46,7 @@ }, zip_safe=True, cmdclass={'egg_info': tagger}, + extras_require={':python_version<"3"': [ + 'futures >= 3.0.5', 'subprocess32'], + ':python_version<"3.5"': ['typing >= 3.5.2'] } )