diff --git a/python/pybind11/pybind11.SlackBuild b/python/pybind11/pybind11.SlackBuild index 2e841f4db9..1dd777618e 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