@@ -136,9 +136,38 @@ function install_python3 {
136
136
install_pkg git " $PACKAGE_MANAGER "
137
137
fi
138
138
139
- echo " ==> installing python3 via pyenv..."
140
- curl https://pyenv.run | bash
139
+ PACKAGE_MANAGER=$1
140
+
141
+ echo " ==> installing python3..."
141
142
143
+ case " $PACKAGE_MANAGER " in
144
+ apt-get)
145
+ install_pkg python3-all-dev " $PACKAGE_MANAGER "
146
+ install_pkg python3-setuptools " $PACKAGE_MANAGER "
147
+ install_pkg python3-pip " $PACKAGE_MANAGER "
148
+ install_pkg libcairo2-dev " $PACKAGE_MANAGER "
149
+ ;;
150
+ apk)
151
+ install_pkg python3-dev " $PACKAGE_MANAGER "
152
+ install_pkg py3-pip " $PACKAGE_MANAGER "
153
+ install_pkg libffi-dev " $PACKAGE_MANAGER "
154
+ ;;
155
+ brew | pacman)
156
+ install_pkg python3 " $PACKAGE_MANAGER "
157
+ install_pkg cairo " $PACKAGE_MANAGER "
158
+ ;;
159
+ yum | dnf)
160
+ install_pkg python3-devel " $PACKAGE_MANAGER "
161
+ install_pkg cairo-devel " $PACKAGE_MANAGER "
162
+ ;;
163
+ * )
164
+ echo " Unable to install python3 with package manager: $PACKAGE_MANAGER "
165
+ exit 1
166
+ ;;
167
+ esac
168
+
169
+ echo " ==> installing pyenv..."
170
+ curl https://pyenv.run | bash
142
171
# Check if pyenv is already initialized in the profile
143
172
if ! command -v pyenv > /dev/null; then
144
173
# Add PYENV_ROOT to the profile
@@ -154,9 +183,9 @@ function install_python3 {
154
183
155
184
# Source the profile to apply changes to the current session
156
185
source $HOME /.profile
157
- # install python3.9
158
- pyenv install 3.9
159
- pyenv global 3.9
186
+ pyenv install 3.12.2
187
+ pyenv global 3.12.2
188
+ pip install --upgrade pip setuptools wheel
160
189
}
161
190
162
191
function install_openssl {
@@ -655,18 +684,18 @@ if [[ "$INSTALL_DEV_TOOLS" == "true" ]]; then
655
684
install_pkg graphviz " $PACKAGE_MANAGER "
656
685
install_pkg graphviz-dev " $PACKAGE_MANAGER "
657
686
fi
658
- python3 -m pip install --quiet boto3 " moto[all]" black shfmt-py toml yamllint
687
+ pip install --quiet boto3 " moto[all]" black shfmt-py toml yamllint
659
688
# drivers
660
- python3 -m pip install --quiet pymysql sqlalchemy clickhouse_driver
689
+ pip install --quiet pymysql sqlalchemy clickhouse_driver
661
690
# sqllogic dependencies
662
- python3 -m pip install --quiet mysql-connector-python==8.0.30
691
+ pip install --quiet mysql-connector-python==8.0.30
663
692
fi
664
693
665
694
if [[ " $INSTALL_CODEGEN " == " true" ]]; then
666
695
install_pkg clang " $PACKAGE_MANAGER "
667
696
install_pkg llvm " $PACKAGE_MANAGER "
668
697
install_python3 " $PACKAGE_MANAGER "
669
- " ${PRE_COMMAND[@]} " python3 -m pip install --quiet coscmd PyYAML
698
+ " ${PRE_COMMAND[@]} " pip install --quiet coscmd PyYAML
670
699
fi
671
700
672
701
if [[ " $INSTALL_TPCH_DATA " == " true" ]]; then
0 commit comments