Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test-install-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ jobs:
if: ${{ matrix.distribution.type == 'arch' }}
run: |
pacman --noconfirm --refresh base --sync git sudo
# The behavior we follow in install.sh is unique with Arch in that
# we leave it to the user to install the appropriate version of python,
# so we need to install python here in order for the test to succeed.
pacman --noconfirm -U --needed https://archive.archlinux.org/packages/p/python/python-3.9.9-1-x86_64.pkg.tar.zst

- name: Prepare CentOS
if: ${{ matrix.distribution.type == 'centos' }}
Expand Down
18 changes: 9 additions & 9 deletions install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,17 @@ if [ "$(uname)" = "Linux" ]; then
sudo apt-get install -y python3-venv
elif type pacman >/dev/null 2>&1 && [ -f "/etc/arch-release" ]; then
# Arch Linux
# Arch provides latest python version. User will need to manually install python 3.9 if it is not present
echo "Installing on Arch Linux."
echo "Python <= 3.9.9 is required. Installing python-3.9.9-1"
case $(uname -m) in
x86_64)
sudo pacman ${PACMAN_AUTOMATED} -U --needed https://archive.archlinux.org/packages/p/python/python-3.9.9-1-x86_64.pkg.tar.zst
;;
aarch64)
sudo pacman ${PACMAN_AUTOMATED} -U --needed http://tardis.tiny-vps.com/aarm/packages/p/python/python-3.9.9-1-aarch64.pkg.tar.xz
x86_64|aarch64)
sudo pacman ${PACMAN_AUTOMATED} -S --needed git
;;
*)
echo "Incompatible CPU architecture. Must be x86_64 or aarch64."
exit 1
;;
esac
sudo pacman ${PACMAN_AUTOMATED} -S --needed git
esac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure of the indentation here. This seems more proper but...

elif type yum >/dev/null 2>&1 && [ ! -f "/etc/redhat-release" ] && [ ! -f "/etc/centos-release" ] && [ ! -f "/etc/fedora-release" ]; then
# AMZN 2
echo "Installing on Amazon Linux 2."
Expand Down Expand Up @@ -191,8 +187,12 @@ find_python() {
if [ "$BEST_VERSION" = "3" ]; then
PY3_VERSION=$(python$BEST_VERSION --version | cut -d ' ' -f2)
if [[ "$PY3_VERSION" =~ 3.10.* ]]; then
echo "Chia requires Python version <= 3.9.9"
echo "Chia requires Python version <= 3.9.10"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not needed to track the latest patch version. 3.7 - 3.9 or such seems reasonable.

echo "Current Python version = $PY3_VERSION"
# If Arch, direct to Arch Wiki
if type pacman >/dev/null 2>&1 && [ -f "/etc/arch-release" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine we could first take a pass and identify the system and store that in (a) variable(s) and then go back and act on that info instead of having the checks mixed around. But, that's a separate change.

echo "Please see https://wiki.archlinux.org/title/python#Old_versions for support."
fi
exit 1
fi
fi
Expand Down