Skip to content

Commit

Permalink
Update build dependencies and mypy-protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandInguva committed Dec 20, 2022
1 parent 0290315 commit e7a7858
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 23 deletions.
17 changes: 3 additions & 14 deletions sdks/python/build-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,11 @@
# TODO(https://github.com/apache/beam/issues/20051): Consider PEP-517/PEP-518 instead of this file.

setuptools
# grpcio-tools depends on grpcio and the grpcio>1.50.0 results in error(ImportModuleError six)
# when installing Apache Beam source via pip install -e .
# Adding six as part of build dependencies.
# https://github.com/apache/beam/issues/24432
six
wheel>=0.36.0

grpcio-tools==1.37.0
# TODO(https://github.com/apache/beam/issues/23734): the sdist for grpcio==1.50.0 is failing on GH workers
# pin grpcio to the previous version.
grpcio==1.49.1;sys_platform=="darwin"
mypy-protobuf==1.18
protobuf==3.19.4;python_version=="3.10" and sys_platform=="darwin"

grpcio-tools==1.51.1
mypy-protobuf==3.4.0
# Avoid https://github.com/pypa/virtualenv/issues/2006
distlib==0.3.1
distlib==0.3.6

# Numpy headers
numpy>=1.14.3,<1.23.0
20 changes: 11 additions & 9 deletions sdks/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,17 @@ def get_portability_package_data():
generate_protos_first()
# Keep all dependencies inlined in the setup call, otherwise Dependabot won't
# be able to parse it.
if sys.platform == 'darwin' and (
sys.version_info.major == 3 and sys.version_info.minor == 10):
# TODO (https://github.com/apache/beam/issues/23585): Protobuf wheels
# for version 3.19.5, 3.19.6 and 3.20.x on Python 3.10 and MacOS are
# rolled back due to some errors on MacOS. So, for Python 3.10 on MacOS
# restrict the protobuf with tight upper bound(3.19.4)
protobuf_dependency = ['protobuf>3.12.2,<3.19.5']
else:
protobuf_dependency = ['protobuf>3.12.2,<4']
# if sys.platform == 'darwin' and (
# sys.version_info.major == 3 and sys.version_info.minor == 10):
# # TODO (https://github.com/apache/beam/issues/23585): Protobuf wheels
# # for version 3.19.5, 3.19.6 and 3.20.x on Python 3.10 and MacOS are
# # rolled back due to some errors on MacOS. So, for Python 3.10 on MacOS
# # restrict the protobuf with tight upper bound(3.19.4)
# protobuf_dependency = ['protobuf>3.12.2,<3.19.5']
# else:
# protobuf_dependency = ['protobuf>3.12.2,<4']

protobuf_dependency = ['protobuf>=4.21.1,<=4.21.11']

setuptools.setup(
name=PACKAGE_NAME,
Expand Down

0 comments on commit e7a7858

Please sign in to comment.