From 51ebfb00a84ad5734f362193002994b435841784 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Tue, 19 Dec 2023 17:42:02 -0800 Subject: [PATCH] Install macos deps on arm64 --- packages/postgresml-python/DEBIAN/postinst | 2 +- packages/postgresml-python/build.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/postgresml-python/DEBIAN/postinst b/packages/postgresml-python/DEBIAN/postinst index d62a53350..6b385f2f3 100755 --- a/packages/postgresml-python/DEBIAN/postinst +++ b/packages/postgresml-python/DEBIAN/postinst @@ -7,5 +7,5 @@ set -e # Setup virtualenv virtualenv /var/lib/postgresml-python/pgml-venv source "/var/lib/postgresml-python/pgml-venv/bin/activate" -python -m pip install -r "/etc/postgresml-python/requirements.linux.txt" +python -m pip install -r "/etc/postgresml-python/requirements.txt" deactivate diff --git a/packages/postgresml-python/build.sh b/packages/postgresml-python/build.sh index f559547f5..2ae1fbb03 100644 --- a/packages/postgresml-python/build.sh +++ b/packages/postgresml-python/build.sh @@ -28,12 +28,16 @@ rm "$deb_dir/release.sh" (cat ${SCRIPT_DIR}/DEBIAN/prerm | envsubst '${PGVERSION}') > "$deb_dir/DEBIAN/prerm" (cat ${SCRIPT_DIR}/DEBIAN/postrm | envsubst '${PGVERSION}') > "$deb_dir/DEBIAN/postrm" -cp ${SCRIPT_DIR}/../../pgml-extension/requirements.linux.txt "$deb_dir/etc/postgresml-python/requirements.linux.txt" +if [[ "$ARCH" == "amd64" ]]; then + cp ${SCRIPT_DIR}/../../pgml-extension/requirements.linux.txt "$deb_dir/etc/postgresml-python/requirements.txt" +else + cp ${SCRIPT_DIR}/../../pgml-extension/requirements.macos.txt "$deb_dir/etc/postgresml-python/requirements.txt" +fi virtualenv --python="python$PYTHON_VERSION" "$deb_dir/var/lib/postgresml-python/pgml-venv" source "$deb_dir/var/lib/postgresml-python/pgml-venv/bin/activate" -python -m pip install -r "${deb_dir}/etc/postgresml-python/requirements.linux.txt" +python -m pip install -r "${deb_dir}/etc/postgresml-python/requirements.txt" deactivate