mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 19:52:52 +00:00
Add 8.50 - Build python
This commit is contained in:
parent
2be75a914c
commit
d7f60ae945
2 changed files with 53 additions and 0 deletions
42
scripts/chapter8/8.50-python.sh
Normal file
42
scripts/chapter8/8.50-python.sh
Normal file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /sources
|
||||
tar xf Python-3.10.6.tar.xz
|
||||
cd Python-3.10.6
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--enable-shared \
|
||||
--with-system-expat \
|
||||
--with-system-ffi \
|
||||
--enable-optimizations
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make -j5
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make install
|
||||
|
||||
cat > /etc/pip.conf << EOF
|
||||
[global]
|
||||
root-user-action = ignore
|
||||
disable-pip-version-check = true
|
||||
EOF
|
||||
|
||||
install -v -dm755 /usr/share/doc/python-3.10.6/html
|
||||
|
||||
tar --strip-components=1 \
|
||||
--no-same-owner \
|
||||
--no-same-permissions \
|
||||
-C /usr/share/doc/python-3.10.6/html \
|
||||
-xvf ../python-3.10.6-docs-html.tar.bz2
|
||||
|
||||
cd /sources
|
||||
rm -rf Python-3.10.6
|
|
@ -1139,3 +1139,14 @@ then
|
|||
stop_script "chapter8/8.49-libffi.sh"
|
||||
fi
|
||||
|
||||
# Chapter 8.50
|
||||
echo "Building Python"
|
||||
su -c "bash $SCRIPT/chapter8/8.50-python.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter8/8.50-python.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue