@@ -80,14 +80,16 @@ python setup.py build
80
80
python setup.py test
81
81
82
82
# Deploy source package to testing PyPI
83
- python setup.py sdist upload -r https://test.pypi.org/legacy/
83
+ python setup.py sdist
84
+ twine upload --skip-existing -r testpypi -u protobuf-wheel-test dist/*
84
85
85
86
# Test locally with different python versions.
86
87
run_install_test ${TESTING_VERSION} python2.7 https://test.pypi.org/simple
87
88
run_install_test ${TESTING_VERSION} python3 https://test.pypi.org/simple
88
89
89
90
# Deploy egg/wheel packages to testing PyPI and test again.
90
- python setup.py bdist_egg bdist_wheel upload -r https://test.pypi.org/legacy/
91
+ python setup.py clean build bdist_wheel
92
+ twine upload --skip-existing -r testpypi -u protobuf-wheel-test dist/*
91
93
92
94
run_install_test ${TESTING_VERSION} python2.7 https://test.pypi.org/simple
93
95
run_install_test ${TESTING_VERSION} python3 https://test.pypi.org/simple
@@ -103,13 +105,15 @@ if [ $TESTING_ONLY -eq 0 ]; then
103
105
echo " Publishing to PyPI..."
104
106
# Be sure to run build before sdist, because otherwise sdist will not include
105
107
# well-known types.
106
- python setup.py clean build sdist upload
108
+ python setup.py clean build sdist
109
+ twine upload --skip-existing -u protobuf-packages dist/*
107
110
# Be sure to run clean before bdist_xxx, because otherwise bdist_xxx will
108
111
# include files you may not want in the package. E.g., if you have built
109
112
# and tested with --cpp_implemenation, bdist_xxx will include the _message.so
110
113
# file even when you no longer pass the --cpp_implemenation flag. See:
111
114
# https://github.com/protocolbuffers/protobuf/issues/3042
112
- python setup.py clean build bdist_egg bdist_wheel upload
115
+ python setup.py clean build bdist_wheel
116
+ twine upload --skip-existing -u protobuf-packages dist/*
113
117
else
114
118
# Set the version number back (i.e., remove dev suffix).
115
119
sed -i -r " s/__version__ = '.*'/__version__ = '${VERSION} '/" google/protobuf/__init__.py
0 commit comments