File tree 1 file changed +14
-5
lines changed
Filter options
packages/postgresml-python
1 file changed +14
-5
lines changed
Original file line number Diff line number Diff line change @@ -37,11 +37,20 @@ rm "$deb_dir/release.sh"
37
37
(cat ${SCRIPT_DIR} /DEBIAN/prerm | envsubst ' ${PGVERSION} ${PYTHON_VERSION}' ) > " $deb_dir /DEBIAN/prerm"
38
38
(cat ${SCRIPT_DIR} /DEBIAN/postrm | envsubst ' ${PGVERSION} ${PYTHON_VERSION}' ) > " $deb_dir /DEBIAN/postrm"
39
39
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"
43
45
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
45
54
fi
46
55
47
56
# Create and populate virtualenv
@@ -62,4 +71,4 @@ dpkg-deb \
62
71
--build " $deb_dir " \
63
72
" postgresml-python-${PACKAGE_VERSION} -ubuntu${UBUNTU_VERSION} -${ARCH} .deb"
64
73
65
- rm -rf " $deb_dir "
74
+ rm -rf " $deb_dir "
You can’t perform that action at this time.
0 commit comments