Skip to content

Commit e241e9c

Browse files
committed
unfreeze
1 parent 1c4744d commit e241e9c

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

packages/postgresml-python/build.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,20 @@ rm "$deb_dir/release.sh"
3737
(cat ${SCRIPT_DIR}/DEBIAN/prerm | envsubst '${PGVERSION} ${PYTHON_VERSION}') > "$deb_dir/DEBIAN/prerm"
3838
(cat ${SCRIPT_DIR}/DEBIAN/postrm | envsubst '${PGVERSION} ${PYTHON_VERSION}') > "$deb_dir/DEBIAN/postrm"
3939

40-
# Copy appropriate requirements file based on architecture
41-
if [[ "$ARCH" == "amd64" ]]; then
42-
cp ${SCRIPT_DIR}/../../pgml-extension/requirements.linux.txt "$deb_dir/etc/postgresml-python/requirements.txt"
40+
# Select requirements file based on Ubuntu version and architecture
41+
if [[ "${UBUNTU_VERSION}" == "20.04" ]]; then
42+
# Frozen requirements are not longer available on Ubuntu 20.04
43+
cp ${SCRIPT_DIR}/../../pgml-extension/requirements.txt "$deb_dir/etc/postgresml-python/requirements.txt"
44+
echo "Recomputing requirements.txt for Ubuntu 20.04"
4345
else
44-
cp ${SCRIPT_DIR}/../../pgml-extension/requirements.macos.txt "$deb_dir/etc/postgresml-python/requirements.txt"
46+
# Use frozen requirements for newer Ubuntu versions
47+
if [[ "$ARCH" == "amd64" ]]; then
48+
cp ${SCRIPT_DIR}/../../pgml-extension/requirements.linux.txt "$deb_dir/etc/postgresml-python/requirements.txt"
49+
echo "Using frozen Linux requirements for Ubuntu ${UBUNTU_VERSION}"
50+
else
51+
cp ${SCRIPT_DIR}/../../pgml-extension/requirements.macos.txt "$deb_dir/etc/postgresml-python/requirements.txt"
52+
echo "Using frozen macOS requirements for Ubuntu ${UBUNTU_VERSION}"
53+
fi
4554
fi
4655

4756
# Create and populate virtualenv
@@ -62,4 +71,4 @@ dpkg-deb \
6271
--build "$deb_dir" \
6372
"postgresml-python-${PACKAGE_VERSION}-ubuntu${UBUNTU_VERSION}-${ARCH}.deb"
6473

65-
rm -rf "$deb_dir"
74+
rm -rf "$deb_dir"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy