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