Skip to content

Commit 32e4c1c

Browse files
authored
Merge pull request grpc#24267 from lidizheng/fix-macos-enum
Don't install enum34 for non-2.7 Python
2 parents d6e828b + 811a78f commit 32e4c1c

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# GRPC Python setup requirements
22
coverage>=4.0
33
cython>=0.29.8
4-
enum34>=1.0.4
54
protobuf>=3.5.0.post1, < 4.0dev
65
six>=1.10
76
wheel>=0.29

src/python/grpcio_tests/setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
}
3939

4040
INSTALL_REQUIRES = (
41-
'coverage>=4.0', 'enum34>=1.0.4',
42-
'grpcio>={version}'.format(version=grpc_version.VERSION),
41+
'coverage>=4.0', 'grpcio>={version}'.format(version=grpc_version.VERSION),
4342
'grpcio-channelz>={version}'.format(version=grpc_version.VERSION),
4443
'grpcio-status>={version}'.format(version=grpc_version.VERSION),
4544
'grpcio-tools>={version}'.format(version=grpc_version.VERSION),
@@ -48,7 +47,7 @@
4847
'google-auth>=1.17.2', 'requests>=2.14.2')
4948

5049
if not PY3:
51-
INSTALL_REQUIRES += ('futures>=2.2.0',)
50+
INSTALL_REQUIRES += ('futures>=2.2.0', 'enum34>=1.0.4')
5251

5352
COMMAND_CLASS = {
5453
# Run `preprocess` *before* doing any packaging!

tools/internal_ci/helper_scripts/prepare_build_macos_rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ then
8989
# python
9090
time pip install --user virtualenv
9191
time pip install --user --upgrade Mako six tox setuptools==44.1.1 twisted pyyaml pyjwt cryptography requests
92-
export PYTHONPATH=/Library/Python/3.4/site-packages
9392

9493
# make sure md5sum is available (requires coreutils 8.31+)
94+
brew update-reset
9595
brew upgrade coreutils
9696

9797
# Install Python 3.7 and Python 3.8

tools/run_tests/artifacts/build_artifact_python.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ then
104104

105105
if [ "$("$PYTHON" -c "import sys; print(sys.version_info[0])")" == "2" ]
106106
then
107-
"${PIP}" install futures>=2.2.0
107+
"${PIP}" install futures>=2.2.0 enum34>=1.0.4
108108
fi
109109

110110
"${PIP}" install grpcio --no-index --find-links "file://$ARTIFACT_DIR/"

tools/run_tests/helper_scripts/build_python.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ esac
188188
pip_install --upgrade setuptools==44.1.1
189189
pip_install --upgrade pip==19.3.1
190190
pip_install --upgrade cython
191-
pip_install --upgrade six enum34 protobuf
191+
pip_install --upgrade six protobuf
192192

193193
if [ "$("$VENV_PYTHON" -c "import sys; print(sys.version_info[0])")" == "2" ]
194194
then
195-
pip_install futures
195+
pip_install --upgrade futures enum34
196196
fi
197197

198198
pip_install_dir "$ROOT"

0 commit comments

Comments
 (0)