104 lines
1.8 KiB
Groff
104 lines
1.8 KiB
Groff
|
#!/bin/sh
|
||
|
# sit class file
|
||
|
#
|
||
|
# Christoph Niethammer <niethammer@hlrs.de> (C) 2018
|
||
|
#
|
||
|
|
||
|
CATEGORY="development"
|
||
|
PACKAGE="python/vanilla_python"
|
||
|
VERSION="3.8.1"
|
||
|
SHORT_VERSION="3.8"
|
||
|
URL="https://www.python.org/"
|
||
|
INSTALLER="Jose Gracia <gracia@hlrs.de>"
|
||
|
|
||
|
|
||
|
|
||
|
# Archive A and package name P
|
||
|
A="Python-${VERSION}.tgz"
|
||
|
P="Python-${VERSION}"
|
||
|
|
||
|
|
||
|
# Other interesting configure options:
|
||
|
#--enable-sampling \
|
||
|
CONFIGURE_OPTS=" \
|
||
|
--enable-shared
|
||
|
--enable-unicode=ucs4
|
||
|
--enable-optimizations
|
||
|
--with-ensurepip
|
||
|
"
|
||
|
|
||
|
|
||
|
case $PLATFORM in
|
||
|
vulcan|laki|slc)
|
||
|
;;
|
||
|
hazelhen)
|
||
|
;;
|
||
|
*)
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
src_postinst() {
|
||
|
|
||
|
set_symlinks
|
||
|
|
||
|
install_vanilla_packages
|
||
|
|
||
|
#install_site_packages
|
||
|
|
||
|
echo "******** DO NOT FORGET to enable pip-site mechanism"
|
||
|
}
|
||
|
|
||
|
install_vanilla_packages() {
|
||
|
# install numpy, mpi4py
|
||
|
|
||
|
export LD_LIBRARY_PATH=$PREFIX/lib/:$LD_LIBRARY_PATH
|
||
|
export PYTHONPATH=$PREFIX/lib/python${SHORT_VERSION}/site-packages
|
||
|
|
||
|
_PIP_SITE_INDEX_URL="http://localhost:3141/root/pypi/+simple/"
|
||
|
export PIP_DEFAULT_TIMEOUT=2
|
||
|
export PIP_DISABLE_PIP_VERSION_CHECK=1
|
||
|
export PIP_INDEX_URL=$_PIP_SITE_INDEX_URL
|
||
|
|
||
|
$PREFIX/bin/pip install numpy scipy dask
|
||
|
$PREFIX/bin/pip list
|
||
|
|
||
|
# freeze site-packages directory
|
||
|
chmod -R a-w $PREFIX/lib/python${SHORT_VERSION}/site-packages
|
||
|
}
|
||
|
|
||
|
install_site_packages() {
|
||
|
/bin/true
|
||
|
}
|
||
|
|
||
|
|
||
|
src_setperms() {
|
||
|
chmod -R g=u $PREFIX
|
||
|
chmod -R o=u-w $PREFIX
|
||
|
}
|
||
|
|
||
|
|
||
|
set_symlinks() {
|
||
|
# Adding some symlinks
|
||
|
# Actually PEP 394 recomments against this, but we will do it anyway
|
||
|
|
||
|
cd $PREFIX/bin
|
||
|
FILES="python pip pydoc"
|
||
|
for FILE in $FILES; do
|
||
|
if [ ! -f $FILE ]; then
|
||
|
if [ -f ${FILE}3 ]; then
|
||
|
ln -s ${FILE}3 ${FILE}
|
||
|
fi
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
|
||
|
# src_build() {
|
||
|
# make shared add_binutils_objs
|
||
|
# }
|
||
|
#
|
||
|
# src_install() {
|
||
|
# ln -s ../$PACKAGE-$VERSION/doc .
|
||
|
# make install || sit_fail "Installation failed"
|
||
|
# }
|