Skip to content

Commit

Permalink
python-3.7.6: Add boost for pycuda
Browse files Browse the repository at this point in the history
  • Loading branch information
david authored and donald committed Mar 29, 2020
1 parent 44d3f2f commit 961b8f5
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions python-3.7.6-0.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,46 @@ pip3 install --prefix=$PREFIX libxml2-python3 # required by several bee packages
pip3 install --prefix=$PREFIX scour # https://github.molgen.mpg.de/mariux64/pkg-scripts/issues/98
pip3 install --prefix=$PREFIX multiqc

#boost for pycuda
(
. ${PREFIX}/profile
BOOST_VERSION="1.72.0 1_72_0"
BOOST_SRC=https://dl.bintray.com/boostorg/release/$( echo $BOOST_VERSION | cut -d" " -f1 )/source/boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz
PKGCFLAGS="-O2 -fPIC"

cd $BUILDDIR
test -e boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz || wget $BOOST_SRC
test -d boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) || mkdir boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) && tar -xf boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz -C boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) --strip-components=1

cd boost-$( echo $BOOST_VERSION | cut -d" " -f1 )
sed -e "/using python/ s|;|: ${PREFIX}/include/python${PYTHONVER}m ;|" \
-i bootstrap.sh

./bootstrap.sh \
--with-toolset=gcc \
--with-icu \
--with-python=$PREFIX/bin/python3 \
--with-libraries=python,thread || exit 1

./b2 \
$NUMJOBS \
--layout=system \
--build-dir=build-python3 \
--prefix=$PREFIX \
--libdir=$PREFIX/lib \
--build-type=minimal \
toolset=gcc \
variant=release \
debug-symbols=off \
link=shared \
threading=multi \
runtime-link=shared \
python=$PYTHONVER \
cflags="$PKGCFLAGS" \
cxxflags="$PKGCFLAGS" \
install || exit 1
)

# try to load all packages, maybe we can see installation errors
python3 -c 'help("modules")' > /dev/null

Expand Down

0 comments on commit 961b8f5

Please sign in to comment.