Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e241e9c

Browse filesBrowse files
committed
unfreeze
1 parent 1c4744d commit e241e9c
Copy full SHA for e241e9c

File tree

1 file changed

+14
-5
lines changed
Filter options

1 file changed

+14
-5
lines changed

‎packages/postgresml-python/build.sh

Copy file name to clipboardExpand all lines: packages/postgresml-python/build.sh
+14-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.