From b45ce5eee53e459f6b2f399f3d908d5ceb41ba9d Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Tue, 10 Nov 2020 14:33:16 -0800 Subject: [PATCH] Updated python/release.sh to use Python 3 for setup.py This fixed an error I was getting about bdist_wheel not being found. --- python/release.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/release.sh b/python/release.sh index 6db87f0bb2..fc88b08e3e 100755 --- a/python/release.sh +++ b/python/release.sh @@ -80,11 +80,11 @@ fi cd python # Run tests locally. -python setup.py build -python setup.py test +python3 setup.py build +python3 setup.py test # Deploy source package to testing PyPI -python setup.py sdist +python3 setup.py sdist twine upload --skip-existing -r testpypi -u protobuf-wheel-test dist/* # Test locally with different python versions. @@ -92,7 +92,7 @@ run_install_test ${TESTING_VERSION} python2.7 https://test.pypi.org/simple run_install_test ${TESTING_VERSION} python3 https://test.pypi.org/simple # Deploy egg/wheel packages to testing PyPI and test again. -python setup.py clean build bdist_wheel +python3 setup.py clean build bdist_wheel twine upload --skip-existing -r testpypi -u protobuf-wheel-test dist/* run_install_test ${TESTING_VERSION} python2.7 https://test.pypi.org/simple @@ -109,14 +109,14 @@ if [ $TESTING_ONLY -eq 0 ]; then echo "Publishing to PyPI..." # Be sure to run build before sdist, because otherwise sdist will not include # well-known types. - python setup.py clean build sdist + python3 setup.py clean build sdist twine upload --skip-existing -u protobuf-packages dist/* # Be sure to run clean before bdist_xxx, because otherwise bdist_xxx will # include files you may not want in the package. E.g., if you have built # and tested with --cpp_implemenation, bdist_xxx will include the _message.so # file even when you no longer pass the --cpp_implemenation flag. See: # https://github.com/protocolbuffers/protobuf/issues/3042 - python setup.py clean build bdist_wheel + python3 setup.py clean build bdist_wheel twine upload --skip-existing -u protobuf-packages dist/* else # Set the version number back (i.e., remove dev suffix).