Skip to content

Commit

Permalink
numpy < 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sir-sigurd committed Nov 28, 2024
1 parent 9866aac commit 1c2ecd7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/py-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
# - Run "strip" on shared libraries
python -m pip install -t deps --no-deps -r lambdas/${{ matrix.path }}/requirements.txt lambdas/${{ matrix.path }}
find deps -name tests -type d -exec rm -r \{} \+
find deps \! -path '*/numpy.libs/*' \( -name '*.so.*' -o -name '*.so' \) -type f -exec strip \{} \+
find deps \( -name '*.so.*' -o -name '*.so' \) -type f -exec strip \{} \+
if [ ${{ matrix.path }} == "tabular_preview" ]
then
Expand Down
4 changes: 1 addition & 3 deletions lambdas/scripts/build_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ find . \( -name 'test_*' -o -name '*.py' -o -name '*.h' -o -name '*.c' -o -name
for lib in pyarrow/*.so.*; do rm -f "${lib%%.*}.so"; done

find . -name tests -type d -exec rm -r \{} \+
# Stripping numpy.libs results in libscipy_openblas64_-ff651d7f.so: ELF load command address/offset not properly aligned
# which is probably caused by some bug in glibc (it happens on Ubuntu 22.04, Amazon Linux 2/2023, but not on Ubuntu 24.04).
find . \! -path '*/numpy.libs/*' \( -name '*.so.*' -o -name '*.so' \) -type f -exec strip \{} \+
find . \( -name '*.so.*' -o -name '*.so' \) -type f -exec strip \{} \+

MAX_SIZE=262144000
size=$(du -b -s . | cut -f 1)
Expand Down
6 changes: 4 additions & 2 deletions lambdas/tabular_preview/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ multidict==6.1.0
# via
# aiohttp
# yarl
numpy==2.1.3
# via pandas
numpy==1.26.4
# via
# pandas
# t4_lambda_tabular_preview (setup.py)
openpyxl==3.1.5
# via t4_lambda_tabular_preview (setup.py)
pandas==2.2.3
Expand Down
5 changes: 5 additions & 0 deletions lambdas/tabular_preview/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"xlrd >=2,< 3",
"openpyxl >=3,<4 ",
"fsspec[http] >= 2022.1.0",
# Stripping numpy.libs in numpy 2 results in
# libscipy_openblas64_-ff651d7f.so: ELF load command address/offset not properly aligned
# which is probably caused by some bug in glibc (it happens on Ubuntu 22.04, Amazon Linux 2/2023,
# but not on Ubuntu 24.04).
"numpy < 2",
(
"t4_lambda_shared @ https://github.com/quiltdata/quilt/archive/"
"f45d8ab51f2d60e98efda7510322f94d822e4eb4.zip"
Expand Down

0 comments on commit 1c2ecd7

Please sign in to comment.