Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
pkg-scripts/snakemake-7.1.1-0.build.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
69 lines (50 sloc)
1.89 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 0.3; exec bash /dev/shm/runme-$COOKIE.sh | |
# TESTING=1 | |
PKG=snakemake | |
VERSION=7.1.1 | |
PYTHONVERSION=3.9.10 | |
BUILD=0 | |
PYTHONVER=${PYTHONVERSION%.*} | |
PREFIX=/pkg/$PKG-$VERSION-$BUILD | |
if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi | |
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin | |
set -xe | |
umask 022 | |
BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.$USER.build.tmp | |
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) | |
mkdir -p $BUILD_TMPDIR/home/.cache/pip | |
mkdir -p $BUILD_TMPDIR/home/.local | |
export TMPDIR=$BUILD_TMPDIR | |
export HOME=$BUILD_TMPDIR/home | |
exec </dev/null | |
mkdir -p $PREFIX | |
cat >$PREFIX/profile <<-EOF | |
PATH=$PREFIX/bin:\$PATH | |
export LD_LIBRARY_PATH=$PREFIX/lib\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH | |
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig\${PKG_CONFIG_PATH:+:}\$PKG_CONFIG_PATH | |
export PKG_CONFIG_PATH | |
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH ; fi | |
EOF | |
. $PREFIX/profile | |
NPROC=$(( $(nproc) * 4 / 5 + 1 )) | |
export MAKEFLAGS="-j $NPROC" | |
BUILDDIR=$PREFIX/build | |
mkdir -p $BUILDDIR | |
cd $BUILDDIR | |
# orig: https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz | |
BEEHIVE=https://beehive.molgen.mpg.de/1440acb71471e2394befdb30b1a958d1/Python-3.9.10.tgz | |
test -e Python-$PYTHONVERSION.tgz || wget -nv $BEEHIVE | |
test -d Python-$PYTHONVERSION || tar -xf Python-$PYTHONVERSION.tgz | |
cd Python-$PYTHONVERSION | |
LDFLAGS="-Wl,-rpath=$PREFIX/lib" \ | |
./configure \ | |
--prefix=$PREFIX \ | |
--enable-shared | |
make -j $NPROC | |
make install | |
# it might come to happen that something down the line may just call 'python', defuse ... | |
test -e $PREFIX/bin/python || ln -s python3 $PREFIX/bin/python | |
python3 -m ensurepip | |
pip3 install --prefix=$PREFIX -I pip | |
pip3 install --prefix=$PREFIX snakemake==$VERSION | |