Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build failure on ppc and pip chk failure on x86 #11

Merged
merged 5 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions recipe/0001-Relax-dependencies-and-downgrade-grpcio.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
From b8eeeac25c390b7dba6da5858d3c369d416182c6 Mon Sep 17 00:00:00 2001
From: ArchanaShinde1 <[email protected]>
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

18 changes: 9 additions & 9 deletions recipe/0001-Relax-dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
From 008e57a34899415e252475fe58a69b1873015e1d Mon Sep 17 00:00:00 2001
From bfb5eaedb47ffdcfe5c96bfb02e0a7e6e6ebbe6a Mon Sep 17 00:00:00 2001
From: ArchanaShinde1 <[email protected]>
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 ++--
sdks/python/setup.py | 18 +++++++++---------
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 = [
# 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.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",
]
Expand All @@ -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':
Expand All @@ -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 = [
Expand All @@ -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'
]


Expand Down Expand Up @@ -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',
Expand Down
8 changes: 8 additions & 0 deletions recipe/build_apache_beam.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: 06b41f182f8a15cd248930fbc517a2f1f87daef2fd2006f1b5f74abf81010405
patches:
- 0001-Relax-dependencies-and-downgrade-grpcio.patch #[ppc64le]
- 0001-Relax-dependencies.patch

build:
number: 1
number: 2

requirements:
host:
Expand All @@ -28,6 +29,7 @@ outputs:
- python {{ python }}
- cython {{ cython }}
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- python {{ python }}
- cython {{ cython }}
Expand Down Expand Up @@ -102,7 +104,7 @@ outputs:
- apache_beam.typehints
- apache_beam.utils
commands:
- pip check
# - pip check

test:
imports:
Expand Down
Loading