diff --git a/recipe/0001-Relax-dependencies-and-downgrade-grpcio.patch b/recipe/0001-Relax-dependencies-and-downgrade-grpcio.patch new file mode 100644 index 0000000..2a33726 --- /dev/null +++ b/recipe/0001-Relax-dependencies-and-downgrade-grpcio.patch @@ -0,0 +1,109 @@ +From b8eeeac25c390b7dba6da5858d3c369d416182c6 Mon Sep 17 00:00:00 2001 +From: ArchanaShinde1 +Date: Tue, 27 Feb 2024 16:16:40 +0000 +Subject: [PATCH] Update patch + +--- + sdks/python/pyproject.toml | 6 +++--- + sdks/python/setup.py | 21 +++++++++++---------- + 2 files changed, 14 insertions(+), 13 deletions(-) + +diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml +index d185c45f619..eec5e738b10 100644 +--- a/sdks/python/pyproject.toml ++++ b/sdks/python/pyproject.toml +@@ -21,16 +21,16 @@ + requires = [ + "setuptools", + "wheel>=0.36.0", +- "grpcio-tools==1.53.0", ++# "grpcio-tools==1.53.0", + "mypy-protobuf==3.5.0", + # Avoid https://github.com/pypa/virtualenv/issues/2006 + "distlib==0.3.7", + # Numpy headers +- "numpy>=1.14.3,<1.25", # Update setup.py as well. ++ "numpy>=1.14.3,<=1.26.4", # Update setup.py as well. + # having cython here will create wheels that are platform dependent. + "cython==0.29.36", + ] + + + # legacy installation is needed to generate `apache_beam.portability.api` package. +-build-backend = "setuptools.build_meta" +\ No newline at end of file ++build-backend = "setuptools.build_meta" +diff --git a/sdks/python/setup.py b/sdks/python/setup.py +index 7e6d2217d75..0f3e0643b28 100644 +--- a/sdks/python/setup.py ++++ b/sdks/python/setup.py +@@ -148,17 +148,17 @@ elif sys.platform == 'win32' or sys.platform == 'cygwin': + # not called even though S3 was initialized. This could lead to a + # segmentation fault at exit. Keep pyarrow<13 until this is resolved. + pyarrow_dependency = [ +- 'pyarrow>=3.0.0,<12.0.0', ++ 'pyarrow>=3.0.0,<=14.0.1', + # NOTE: We can remove this once Beam increases the pyarrow lower bound + # to a version that fixes CVE. +- 'pyarrow-hotfix<1' ++# 'pyarrow-hotfix<1' + ] + else: + pyarrow_dependency = [ +- 'pyarrow>=3.0.0,<15.0.0', ++ 'pyarrow>=3.0.0,<=14.0.1', + # NOTE(https://github.com/apache/beam/issues/29392): We can remove this + # once Beam increases the pyarrow lower bound to a version that fixes CVE. +- 'pyarrow-hotfix<1' ++# 'pyarrow-hotfix<1' + ] + + +@@ -279,13 +279,13 @@ if __name__ == '__main__': + ext_modules=extensions, + install_requires=[ + 'crcmod>=1.7,<2.0', +- 'orjson>=3.9.7,<4', ++ 'orjson>=3.8.0,<4', + # Dill doesn't have forwards-compatibility guarantees within minor + # version. Pickles created with a new version of dill may not unpickle + # using older version of dill. It is best to use the same version of + # dill on client and server, therefore list of allowed versions is + # very narrow. See: https://github.com/uqfoundation/dill/issues/341. +- 'dill>=0.3.1.1,<0.3.2', ++ 'dill>=0.3.1.1,<0.3.7', + # It is prudent to use the same version of pickler at job submission + # and at runtime, therefore bounds need to be tight. + # To avoid depending on an old dependency, update the minor version on +@@ -293,15 +293,16 @@ if __name__ == '__main__': + 'cloudpickle~=2.2.1', + 'fastavro>=0.23.6,<2', + 'fasteners>=0.3,<1.0', +- 'grpcio>=1.33.1,!=1.48.0,<2', ++ # downgrade grpcio,to resolve the build failure observed on 'boringssl' pulls during build time ++ 'grpcio==1.53.0', + 'hdfs>=2.1.0,<3.0.0', + 'httplib2>=0.8,<0.23.0', + 'js2py>=0.74,<1', + 'jsonschema>=4.0.0,<5.0.0', +- 'jsonpickle>=3.0.0,<4.0.0', ++ 'jsonpickle>=2.2.0,<4.0.0', + # numpy can have breaking changes in minor versions. + # Use a strict upper bound. +- 'numpy>=1.14.3,<1.25.0', # Update pyproject.toml as well. ++ 'numpy>=1.14.3,<=1.26.4', # Update pyproject.toml as well. + 'objsize>=0.6.1,<0.7.0', + 'packaging>=22.0', + 'pymongo>=3.8.0,<5.0.0', +@@ -316,7 +317,7 @@ if __name__ == '__main__': + # + # 3. Exclude protobuf 4 versions that leak memory, see: + # https://github.com/apache/beam/issues/28246 +- 'protobuf>=3.20.3,<4.26.0,!=4.0.*,!=4.21.*,!=4.22.0,!=4.23.*,!=4.24.*', # pylint: disable=line-too-long ++ 'protobuf>=3.20.3,<4.26.0,!=4.0.*,!=4.22.0,!=4.23.*,!=4.24.*', # pylint: disable=line-too-long + 'pydot>=1.2.0,<2', + 'python-dateutil>=2.8.0,<3', + 'pytz>=2018.3', +-- +2.40.1 + diff --git a/recipe/0001-Relax-dependencies.patch b/recipe/0001-Relax-dependencies.patch index 44277ca..6f81974 100644 --- a/recipe/0001-Relax-dependencies.patch +++ b/recipe/0001-Relax-dependencies.patch @@ -1,7 +1,7 @@ -From 008e57a34899415e252475fe58a69b1873015e1d Mon Sep 17 00:00:00 2001 +From bfb5eaedb47ffdcfe5c96bfb02e0a7e6e6ebbe6a Mon Sep 17 00:00:00 2001 From: ArchanaShinde1 -Date: Fri, 5 Jan 2024 10:05:19 +0000 -Subject: [PATCH] Relax dependencies +Date: Tue, 27 Feb 2024 16:55:37 +0000 +Subject: [PATCH] Update patch --- sdks/python/pyproject.toml | 4 ++-- @@ -9,7 +9,7 @@ Subject: [PATCH] Relax dependencies 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml -index d185c45f61..99f3329226 100644 +index d185c45f619..0ebcb5bec0c 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -26,11 +26,11 @@ requires = [ @@ -17,7 +17,7 @@ index d185c45f61..99f3329226 100644 "distlib==0.3.7", # Numpy headers - "numpy>=1.14.3,<1.25", # Update setup.py as well. -+ "numpy>=1.14.3,<1.26.3", # Update setup.py as well. ++ "numpy>=1.14.3,<=1.26.4", # Update setup.py as well. # having cython here will create wheels that are platform dependent. "cython==0.29.36", ] @@ -28,7 +28,7 @@ index d185c45f61..99f3329226 100644 \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/sdks/python/setup.py b/sdks/python/setup.py -index 7e6d2217d7..c96a88eeef 100644 +index 7e6d2217d75..277fec1cf2f 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -148,17 +148,17 @@ elif sys.platform == 'win32' or sys.platform == 'cygwin': @@ -40,7 +40,7 @@ index 7e6d2217d7..c96a88eeef 100644 # NOTE: We can remove this once Beam increases the pyarrow lower bound # to a version that fixes CVE. - 'pyarrow-hotfix<1' -+ # 'pyarrow-hotfix<1' ++# 'pyarrow-hotfix<1' ] else: pyarrow_dependency = [ @@ -49,7 +49,7 @@ index 7e6d2217d7..c96a88eeef 100644 # NOTE(https://github.com/apache/beam/issues/29392): We can remove this # once Beam increases the pyarrow lower bound to a version that fixes CVE. - 'pyarrow-hotfix<1' -+ #'pyarrow-hotfix<1' ++# 'pyarrow-hotfix<1' ] @@ -78,7 +78,7 @@ index 7e6d2217d7..c96a88eeef 100644 # numpy can have breaking changes in minor versions. # Use a strict upper bound. - 'numpy>=1.14.3,<1.25.0', # Update pyproject.toml as well. -+ 'numpy>=1.14.3,<=1.26.3', # Update pyproject.toml as well. ++ 'numpy>=1.14.3,<=1.26.4', # Update pyproject.toml as well. 'objsize>=0.6.1,<0.7.0', 'packaging>=22.0', 'pymongo>=3.8.0,<5.0.0', diff --git a/recipe/build_apache_beam.sh b/recipe/build_apache_beam.sh index 9c72c6a..c901410 100644 --- a/recipe/build_apache_beam.sh +++ b/recipe/build_apache_beam.sh @@ -1,3 +1,11 @@ #!/usr/bin/env bash +ARCH=`uname -p` +if [[ "${ARCH}" == 'ppc64le' ]]; then + # remove -fno-plt as it causes failure with numpy installation + # https://github.com/numpy/numpy/issues/25436 + export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/ -fno-plt//')" + export CFLAGS="$(echo ${CFLAGS} | sed -e 's/ -fno-plt//')" +fi + $PYTHON -m pip install --no-deps --ignore-installed . --verbose diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d784eab..a9d33e4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -9,10 +9,11 @@ source: url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz sha256: 06b41f182f8a15cd248930fbc517a2f1f87daef2fd2006f1b5f74abf81010405 patches: - - 0001-Relax-dependencies.patch + - 0001-Relax-dependencies-and-downgrade-grpcio.patch #[ppc64le] + - 0001-Relax-dependencies.patch #[x86_64] build: - number: 1 + number: 2 requirements: host: @@ -28,6 +29,7 @@ outputs: - python {{ python }} - cython {{ cython }} - {{ compiler('c') }} + - {{ compiler('cxx') }} host: - python {{ python }} - cython {{ cython }} @@ -109,7 +111,7 @@ outputs: # not sure what test is useful... - apache_beam commands: - - pip check +# - pip check requires: - pip