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>
This commit is contained in:
Andrew Clemons 2021-07-25 19:48:31 +12:00 committed by Willy Sudiarto Raharjo
parent 7ce8349dac
commit 0a23c966b9
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 21 additions and 11 deletions

View File

@ -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