From 7a88cecec23d6acdbe6a974e0803bafb02804cc8 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 15 Feb 2018 20:24:14 +0100 Subject: [PATCH 1/7] python-2.7.14: Rebuild Created with cp python-2.7.14-1.build.sh python-2.7.14-2.build-sh --- python-2.7.14-2.build.sh | 178 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100755 python-2.7.14-2.build.sh diff --git a/python-2.7.14-2.build.sh b/python-2.7.14-2.build.sh new file mode 100755 index 0000000..9cb7901 --- /dev/null +++ b/python-2.7.14-2.build.sh @@ -0,0 +1,178 @@ +#! /bin/bash + +PKG=python +VERSION=2.7.14 +BUILD=1 + +PREFIX=/pkg/$PKG-$VERSION-$BUILD +#PREFIX=/dev/shm/$PKG-$VERSION-$BUILD + +set -xe +umask 022 + +BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp +test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +exec $PREFIX/profile <<-EOF + PATH=$PREFIX/bin:\$PATH +EOF +. $PREFIX/profile + +export MAKEFLAGS="-j $(nproc)" + +BUILDDIR=$PREFIX/build + +mkdir -p $BUILDDIR +cd $BUILDDIR + +URL=https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz +test -e Python-$VERSION.tgz || wget $URL +test -d Python-$VERSION || tar xf Python-$VERSION.tgz +cd Python-$VERSION + +# Required for "Thenao" , bad for virtualenv --enable-shared +# Required for tensorflow : --enable-unicode=ucs4; +./configure --prefix=$PREFIX --enable-shared LDFLAGS=-Wl,-rpath,$PREFIX/lib --enable-unicode=ucs4 +make +make install + +cd $PREFIX +python -m ensurepip +pip install --upgrade pip + +pip install distribute # requested by sven klages. For unknown reasons must be installed early + +pip install Pillow +pip install virtualenv + +pip install NumPy Matplotlib pandas SymPy nose + +pip install ipython[all] +pip install ipywidgets +pip install scikit-learn +pip install seaborn + +( + cd build + test -e bx-python-0.7.2.tar.gz || wget https://pypi.python.org/packages/source/b/bx-python/bx-python-0.7.2.tar.gz + test -d bx-python-0.7.2 || tar xf bx-python-0.7.2.tar.gz + cd bx-python-0.7.2 + + patch -p1 <<'EOF2' +From 6515b765861be47ce64d28605df9fce0b6e47ecc Mon Sep 17 00:00:00 2001 +From: Donald Buczek +Date: Fri, 12 Jun 2015 12:12:35 +0200 +Subject: [PATCH] x + +--- + setup.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 4ed8f19..72b5a44 100644 +--- a/setup.py ++++ b/setup.py +@@ -5,8 +5,8 @@ if sys.version_info < (2, 4): + sys.exit() + + # Automatically download setuptools if not available +-from distribute_setup import use_setuptools +-use_setuptools() ++#from distribute_setup import use_setuptools ++#use_setuptools() + + from setuptools import * + from glob import glob +-- +2.4.1 + +EOF2 + python setup.py install +) + +pip install Cython # for metaseq +pip install pycurl # for metaseq +pip install metaseq + +pip install macs2 +pip install HTSeq + +# for sasse: Theano and tensorflow (cuda version) + +pip install Theano +pip install tensorflow-gpu + +pip install biopython # wird von bressin fuer python3 benutzt. klingt gut, ist in metaseq requirement drin +pip install git+git://github.com/tanghaibao/jcvi.git # angefragt von Dr. Jun Yang + +function plaininstall() { + local dir=$1 + local tar=$2 + local url=$3 + ( + cd build + test -e $tar || wget $url + test -d $dir || tar xvf $tar + cd $dir + ./configure --prefix=$PREFIX + make -j $(nproc) + make install + ) +} + +# for Klages +# +pip install GPy distribute h5py igraph ranger pep8 +plaininstall pygtk-2.24.0 pygtk-2.24.0.tar.gz https://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.gz +plaininstall pygobject-2.28.7 pygobject-2.28.7.tar.xz https://ftp.gnome.org/pub/gnome/sources/pygobject/2.28/pygobject-2.28.7.tar.xz +plaininstall pygtksourceview-2.10.1 pygtksourceview-2.10.1.tar.gz https://ftp.gnome.org/pub/gnome/sources/pygtksourceview/2.10/pygtksourceview-2.10.1.tar.gz +# dbus-python: from 1.2.0 on 'Requested 'dbus-1 >= 1.6' but version of dbus is 1.4.0' +plaininstall dbus-python-1.1.1 dbus-python-1.1.1.tar.gz https://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.1.1.tar.gz + +( + cd build + test -e py2cairo-1.10.0.tar.gz || wget https://www.cairographics.org/releases/py2cairo-1.10.0.tar.bz2 + test -d py2cairo-1.10.0 || tar xf py2cairo-1.10.0.tar.bz2 + cd py2cairo-1.10.0 + ./waf configure --prefix=$PREFIX + ./waf build + ./waf install +) + +pip install keras +pip install deeptools # Alene vom Boemmel -> helpdesk 19.04.2017 + +pip install sphinx +pip install recommonmark # Sabrina Krakau -> Helpdesk 21.06.2017 +pip install fastcluster # Peter Arndt -> Helpdesk: PANNZER - dependencies, 21.07.2017 + +pip install umi_tools # Sven Klages -> Helpdesk 11.09.2017 + +# bunch of packages # Thomas Risch -> Helpdesk 20.11.2017 Topic: 'Cellprofiler', wxPython and gdal left out +# (11 plus deps) # wxPython might cause trouble with existing wxWidgets, gdal build needs more investigation +pip install pytest +pip install cellh5 +pip install centrosome +pip install prokaryote +pip install inflect +pip install javabridge +pip install libtiff +pip install pydot +pip install pygraphviz +pip install python-bioformats +pip install MySQL-python + +pip install CrossMap # Laura Glaser -> Helpdesk 07.12.2017 + +# Helpdesk 01/23/18 21:43, Sabrina Krakau +# pip install umi-tools # see above +pip install cutadapt + +# exit 1 # final test, inhibits 'closing' on success +exit From 5888bc5f073df3f04f3cf370fd26d77c3f953130 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 15 Feb 2018 20:25:51 +0100 Subject: [PATCH 2/7] python-2.7.14: Increase build number --- python-2.7.14-2.build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-2.7.14-2.build.sh b/python-2.7.14-2.build.sh index 9cb7901..adb048b 100755 --- a/python-2.7.14-2.build.sh +++ b/python-2.7.14-2.build.sh @@ -2,7 +2,7 @@ PKG=python VERSION=2.7.14 -BUILD=1 +BUILD=2 PREFIX=/pkg/$PKG-$VERSION-$BUILD #PREFIX=/dev/shm/$PKG-$VERSION-$BUILD From 7603744dd87fe992cf6055cabd1e03b3b15ece06 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 16 Feb 2018 09:48:46 +0100 Subject: [PATCH 3/7] python-2.7.14: Refactor Move function plaininstall() towards the beginning of the file. This makes it easier to exclude parts of the script via `if false; then`...`fi` during development. --- python-2.7.14-2.build.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/python-2.7.14-2.build.sh b/python-2.7.14-2.build.sh index adb048b..3a7966f 100755 --- a/python-2.7.14-2.build.sh +++ b/python-2.7.14-2.build.sh @@ -31,6 +31,21 @@ BUILDDIR=$PREFIX/build mkdir -p $BUILDDIR cd $BUILDDIR +function plaininstall() { + local dir=$1 + local tar=$2 + local url=$3 + ( + cd $BUILDDIR + test -e $tar || wget $url + test -d $dir || tar xvf $tar + cd $dir + ./configure --prefix=$PREFIX + make -j $(nproc) + make install + ) +} + URL=https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz test -e Python-$VERSION.tgz || wget $URL test -d Python-$VERSION || tar xf Python-$VERSION.tgz @@ -111,21 +126,6 @@ pip install tensorflow-gpu pip install biopython # wird von bressin fuer python3 benutzt. klingt gut, ist in metaseq requirement drin pip install git+git://github.com/tanghaibao/jcvi.git # angefragt von Dr. Jun Yang -function plaininstall() { - local dir=$1 - local tar=$2 - local url=$3 - ( - cd build - test -e $tar || wget $url - test -d $dir || tar xvf $tar - cd $dir - ./configure --prefix=$PREFIX - make -j $(nproc) - make install - ) -} - # for Klages # pip install GPy distribute h5py igraph ranger pep8 From c626eb560c5e96d56509b855e1870ddecfe6af23 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 16 Feb 2018 09:55:51 +0100 Subject: [PATCH 4/7] python-2.7.14: Add libgpuarray/pygpu --- python-2.7.14-2.build.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/python-2.7.14-2.build.sh b/python-2.7.14-2.build.sh index 3a7966f..f7f6179 100755 --- a/python-2.7.14-2.build.sh +++ b/python-2.7.14-2.build.sh @@ -111,7 +111,7 @@ EOF2 python setup.py install ) -pip install Cython # for metaseq +pip install Cython # for metaseq,pygpu pip install pycurl # for metaseq pip install metaseq @@ -120,6 +120,21 @@ pip install HTSeq # for sasse: Theano and tensorflow (cuda version) +# install libgpuarray/pygpu for Tensorflow +( + VER=0.7.5 + cd build + test -e libgpuarray-$VER.tar.gz || wget -O libgpuarray-$VER.tar.gz https://codeload.github.com/Theano/libgpuarray/tar.gz/v$VER + test -d libgpuarray-$VER || tar xf libgpuarray-$VER.tar.gz + cd libgpuarray-$VER + test -d Build || mkdir Build + cmake -DCMAKE_INSTALL_PREFIX=$PREFIX . + make + make install + python setup.py build_ext -L $PREFIX/lib -I $PREFIX/include + python setup.py install +) + pip install Theano pip install tensorflow-gpu From 0fdb710204654b89a211d93fde53fa851ae74010 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 16 Feb 2018 09:59:00 +0100 Subject: [PATCH 5/7] python-2.7.14: Add umi-tools, refactor It is unclear, why umi-tools were commented out during the last build. Add it. --- python-2.7.14-2.build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python-2.7.14-2.build.sh b/python-2.7.14-2.build.sh index f7f6179..15e78cb 100755 --- a/python-2.7.14-2.build.sh +++ b/python-2.7.14-2.build.sh @@ -185,9 +185,8 @@ pip install MySQL-python pip install CrossMap # Laura Glaser -> Helpdesk 07.12.2017 -# Helpdesk 01/23/18 21:43, Sabrina Krakau -# pip install umi-tools # see above -pip install cutadapt +pip install cutadapt # Sabrina Krakau, 23.01.2018 (phd Seminar) +pip install umi-tools # Sabrina Krakau, 23.01.2018 (phd Seminar) # exit 1 # final test, inhibits 'closing' on success exit From 637b0e49c07375bbe2787d557b1eb58ba3021a4e Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 16 Feb 2018 10:01:05 +0100 Subject: [PATCH 6/7] python-2.7.14: Add gnome-doc-utils, pssh, iotop These python based tools will be lost from the system when the /usr/lib python is removed. Add them into the package. --- python-2.7.14-2.build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/python-2.7.14-2.build.sh b/python-2.7.14-2.build.sh index 15e78cb..3a1da08 100755 --- a/python-2.7.14-2.build.sh +++ b/python-2.7.14-2.build.sh @@ -188,5 +188,21 @@ pip install CrossMap # Laura Glaser -> Helpdesk 07.12.2017 pip install cutadapt # Sabrina Krakau, 23.01.2018 (phd Seminar) pip install umi-tools # Sabrina Krakau, 23.01.2018 (phd Seminar) +# to be removed from system. Install here: + +plaininstall libxml2-2.9.4 libxml2-2.9.4.tar.gz http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz +plaininstall gnome-doc-utils-0.20.10 gnome-doc-utils-0.20.10.tar.xz https://ftp.gnome.org/pub/gnome/sources/gnome-doc-utils/0.20/gnome-doc-utils-0.20.10.tar.xz +pip install pssh + +( + cd $BUILDDIR + test -e iotop-0.6.tar.gz || wget http://guichaz.free.fr/iotop/files/iotop-0.6.tar.gz + test -d iotop-0.6 || tar xf iotop-0.6.tar.gz + cd iotop-0.6 + python setup.py install + mv $PREFIX/sbin/iotop $PREFIX/bin + rmdir $PREFIX/sbin +) + # exit 1 # final test, inhibits 'closing' on success exit From 060dc8a4bcde32fa9dd8a6f7f6aeb633ad291333 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 16 Feb 2018 10:03:15 +0100 Subject: [PATCH 7/7] python-2.7.14: Add pycairo The previous bulld took pycairo and pygobject required by pygtk from the /usr/lib python installation. As we are about to remove this installation we need to include these here. Change order, so that pygobject is build before pygtk. --- python-2.7.14-2.build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-2.7.14-2.build.sh b/python-2.7.14-2.build.sh index 3a1da08..61a4e98 100755 --- a/python-2.7.14-2.build.sh +++ b/python-2.7.14-2.build.sh @@ -143,9 +143,12 @@ pip install git+git://github.com/tanghaibao/jcvi.git # angefragt von Dr. Jun Yan # for Klages # +# we need cairo otherwise pygtk won't do the gtk stuff and pygtk.h +# if we install cairo with wheel, we dont get a pkg-config file. +pip install --no-binary :all: pycairo pip install GPy distribute h5py igraph ranger pep8 -plaininstall pygtk-2.24.0 pygtk-2.24.0.tar.gz https://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.gz plaininstall pygobject-2.28.7 pygobject-2.28.7.tar.xz https://ftp.gnome.org/pub/gnome/sources/pygobject/2.28/pygobject-2.28.7.tar.xz +plaininstall pygtk-2.24.0 pygtk-2.24.0.tar.gz https://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.gz plaininstall pygtksourceview-2.10.1 pygtksourceview-2.10.1.tar.gz https://ftp.gnome.org/pub/gnome/sources/pygtksourceview/2.10/pygtksourceview-2.10.1.tar.gz # dbus-python: from 1.2.0 on 'Requested 'dbus-1 >= 1.6' but version of dbus is 1.4.0' plaininstall dbus-python-1.1.1 dbus-python-1.1.1.tar.gz https://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.1.1.tar.gz