File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Open diff view settings
packages/postgresml-python Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Open diff view settings
Original file line number Diff line number Diff 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"
4345else
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
4554fi
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 "
You can’t perform that action at this time.
0 commit comments