2018-06-25 14:29:15 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-08-22 00:31:04 +03:00
|
|
|
# needed for strip
|
|
|
|
source util/activate.sh
|
|
|
|
|
2018-06-25 14:29:15 +03:00
|
|
|
HDD_PATH=base
|
|
|
|
|
|
|
|
pushd $HDD_PATH/usr/python/lib || exit 1
|
|
|
|
|
|
|
|
echo "Stripping shared library..."
|
|
|
|
chmod +w libpython3.6m.so
|
|
|
|
i686-pc-toaru-strip libpython3.6m.so
|
|
|
|
chmod -w libpython3.6m.so
|
|
|
|
|
|
|
|
echo "Killing __pycache__ directories..."
|
2018-06-26 03:05:11 +03:00
|
|
|
find . -name __pycache__ -exec rm -r "{}" \;
|
2018-06-25 14:29:15 +03:00
|
|
|
|
|
|
|
# Let's kill some other shit while we're in here
|
|
|
|
pushd python3.6 || exit 1
|
|
|
|
echo "Cleaning up unused modules..."
|
|
|
|
rm -r test distutils tkinter multiprocessing ensurepip config-3.6m/libpython3.6m.a
|
|
|
|
popd
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd $HDD_PATH/usr
|
|
|
|
if [ ! -d bin ]; then
|
|
|
|
mkdir bin
|
|
|
|
fi
|
|
|
|
|
|
|
|
pushd bin
|
|
|
|
|
|
|
|
# Can never be too careful.
|
|
|
|
ln -s ../python/bin/python3.6 python3.6
|
|
|
|
ln -s ../python/bin/python3.6 python3
|
|
|
|
ln -s ../python/bin/python3.6 python
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd lib
|
|
|
|
|
|
|
|
ln -s ../python/lib/libpython3.6m.so
|
|
|
|
|
|
|
|
popd
|
2018-10-03 03:36:53 +03:00
|
|
|
|
2018-06-25 14:29:15 +03:00
|
|
|
popd
|
2018-06-27 02:19:37 +03:00
|
|
|
|
|
|
|
echo "Installing readline hook..."
|
2018-07-19 03:40:18 +03:00
|
|
|
cp util/readline._py $HDD_PATH/usr/python/lib/python3.6/
|
2018-10-03 03:36:53 +03:00
|
|
|
|
|
|
|
echo "Installing demos..."
|
|
|
|
mkdir -p base/usr/share/python-demos
|
|
|
|
cp util/python-demos/*.py base/usr/share/python-demos/
|
2018-10-03 03:54:10 +03:00
|
|
|
|
|
|
|
echo "Installing Help Browser files..."
|
|
|
|
mkdir -p base/usr/share/help
|
|
|
|
mkdir -p base/usr/share/help/licenses
|
|
|
|
cp util/extra-help/*.trt base/usr/share/help/
|
|
|
|
cp util/extra-help/licenses/*.trt base/usr/share/help/licenses/
|