Lines Matching +full:python +full:- +full:version
3 set -ex
6 grep "__version__ = '.*'" python/google/protobuf/__init__.py | sed -r "s/__version__ = '(.*)'/\1/"
10 local VERSION=$1
11 local PYTHON=$2
14 # Setuptools 45.0 removed support for Python 2, so to test with Python 2 we
15 # pass --no-setuptools here and then install an older setuptools version
17 virtualenv -p `which $PYTHON` --no-setuptools test-venv
21 touch test-venv/bin/protoc
22 chmod +x test-venv/bin/protoc
24 source test-venv/bin/activate
26 pip install -i ${PYPI} protobuf==${VERSION} --no-cache-dir
28 rm -fr test-venv
32 [ $# -lt 1 ] && {
33 echo "Usage: $0 VERSION ["
36 echo " Test 3.3.0 release using version number 3.3.0.dev1:"
42 VERSION=$1
46 [ -f "python/google/protobuf/__init__.py" ] || {
51 # Make sure all files are world-readable.
52 find python -type d -exec chmod a+r,a+x {} +
53 find python -type f -exec chmod a+r {} +
56 # Check that the supplied version number matches what's inside the source code.
59 [ "${VERSION}" == "${SOURCE_VERSION}" -o "${VERSION}.${DEV}" == "${SOURCE_VERSION}" ] || {
60 echo "Version number specified on the command line ${VERSION} doesn't match"
61 echo "the actual version number in the source code: ${SOURCE_VERSION}"
66 TESTING_VERSION=${VERSION}.${DEV}
67 if [ -z "${DEV}" ]; then
68 read -p "You are releasing ${VERSION} to PyPI. Are you sure? [y/n]" -r
74 TESTING_VERSION=${VERSION}
76 # Use dev version number for testing.
77 …sed -i -r "s/__version__ = '.*'/__version__ = '${VERSION}.${DEV}'/" python/google/protobuf/__init_…
80 cd python
83 python setup.py build
84 python setup.py test
87 python setup.py sdist
88 twine upload --skip-existing -r testpypi -u protobuf-wheel-test dist/*
90 # Test locally with different python versions.
95 python setup.py clean build bdist_wheel
96 twine upload --skip-existing -r testpypi -u protobuf-wheel-test dist/*
103 if [ $TESTING_ONLY -eq 0 ]; then
104 read -p "Publish to PyPI? [y/n]" -r
111 # well-known types.
112 python setup.py clean build sdist
113 twine upload --skip-existing -u protobuf-packages dist/*
116 # and tested with --cpp_implemenation, bdist_xxx will include the _message.so
117 # file even when you no longer pass the --cpp_implemenation flag. See:
119 python setup.py clean build bdist_wheel
120 twine upload --skip-existing -u protobuf-packages dist/*
122 # Set the version number back (i.e., remove dev suffix).
123 sed -i -r "s/__version__ = '.*'/__version__ = '${VERSION}'/" google/protobuf/__init__.py