From 4dc9d9a4870f7c58b53df2012be878d8985c39e2 Mon Sep 17 00:00:00 2001 From: Ryan Brush Date: Thu, 20 Jun 2024 12:26:10 -0700 Subject: [PATCH] Update setup.py and test scripts to work around breaking changes described in https://stackoverflow.com/questions/78634235/numpy-dtype-size-changed-may-indicate-binary-incompatibility-expected-96-from and https://github.com/pytest-dev/pytest/issues/12275 PiperOrigin-RevId: 645119671 --- google-fhir-views/setup.py | 2 ++ run_tests.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/google-fhir-views/setup.py b/google-fhir-views/setup.py index 64f1b4c..42f530c 100644 --- a/google-fhir-views/setup.py +++ b/google-fhir-views/setup.py @@ -48,6 +48,8 @@ def main(): f'google-fhir-core~={version}', 'immutabledict~=2.2', 'backports.zoneinfo~=0.2.1;python_version<"3.9"', + # Pin to numpy 1 to avoid binary compatibility changes in numpy 2. + 'numpy~=1.24', 'pandas~=1.1', 'protobuf~=3.19', 'python-dateutil~=2.8', diff --git a/run_tests.sh b/run_tests.sh index 43baac7..b5c90e6 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -23,7 +23,9 @@ python3 -m venv ./test_env export FHIR_PY_VERSION=`cat VERSION` pip install wheel -pip install pytest + +# Version pinned for https://github.com/pytest-dev/pytest/issues/12275 +pip install pytest==8.1.2 # Create wheels and install and test them to ensure they are built correctly. pip wheel ./google-fhir-core --wheel-dir wheels