aboutsummaryrefslogtreecommitdiff
path: root/python/pybind11/pybind11.SlackBuild
diff options
context:
space:
mode:
authorAndrew Clemons <andrew.clemons@gmail.com>2021-07-25 19:48:31 +1200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-07-25 16:56:08 +0700
commit0a23c966b920696e5c7c7f3140b3522756a4f3db (patch)
tree708ac03c47f8cefb32fa383c5e55d5a4bf388410 /python/pybind11/pybind11.SlackBuild
parent7ce8349dac970e730063c2535caf39a8f93e98c4 (diff)
python/pybind11: Include python libraries in build
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/pybind11/pybind11.SlackBuild')
-rw-r--r--python/pybind11/pybind11.SlackBuild32
1 files changed, 21 insertions, 11 deletions
diff --git a/python/pybind11/pybind11.SlackBuild b/python/pybind11/pybind11.SlackBuild
index 2e841f4db9bb6..1dd777618e955 100644
--- a/python/pybind11/pybind11.SlackBuild
+++ b/python/pybind11/pybind11.SlackBuild
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pybind11
VERSION=${VERSION:-2.6.2}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -80,18 +80,28 @@ 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 {} \;
+mkdir build
-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 \
+python3 setup.py build
-make
-make install DESTDIR=$PKG
-cd ..
+(
+ cd build
+ cmake .. \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+ -DPYBIND11_TEST=OFF \
+
+ make
+)
+
+python3 setup.py install --prefix=/usr --root="$PKG" --install-headers=/usr/include/pybind11 --skip-build
+
+(
+ cd build
+ make install DESTDIR=$PKG
+)
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