diff options
author | Christoph Willing <chris.willing@linux.com> | 2021-02-12 09:29:54 +1000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-02-14 06:28:03 +0700 |
commit | 4a9c97e39429775812d28d720f66481117decf55 (patch) | |
tree | b57c2b61f2a3f3b70be72e333edc5c3426a4e1c7 /python | |
parent | d5e3de9b3a4afdd8de78cf7ac09a1b5f899126f5 (diff) | |
download | slackbuilds-4a9c97e39429775812d28d720f66481117decf55.tar.gz |
python/pybind11: Use CMake
Signed-off-by: Christoph Willing <chris.willing@linux.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/pybind11/pybind11.SlackBuild | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/python/pybind11/pybind11.SlackBuild b/python/pybind11/pybind11.SlackBuild index 09b5ff9065..093db9bc54 100644 --- a/python/pybind11/pybind11.SlackBuild +++ b/python/pybind11/pybind11.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for pybind11 -# Copyright 2019,2020 Christoph Willing, Brisbane, Australia +# Copyright 2019,2021 Christoph Willing, Brisbane, Australia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ PRGNAM=pybind11 VERSION=${VERSION:-2.5.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -70,19 +70,25 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -python setup.py install --root=$PKG -# Python 3 support. -if $(python3 -c 'import sys' 2>/dev/null); then - python3 setup.py install --root=$PKG -fi +mkdir build && cd build +cmake .. \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DPYBIND11_PYTHON_VERSION=$(python3 --version|cut -d' ' -f2) \ + -DPYBIND11_TEST=OFF \ + +make +make install DESTDIR=$PKG +cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - CONTRIBUTING.md LICENSE README.md \ + CONTRIBUTING.md LICENSE README.md docs/* \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |