diff options
Diffstat (limited to 'python/pybind11')
-rw-r--r-- | python/pybind11/README | 13 | ||||
-rw-r--r-- | python/pybind11/pybind11.SlackBuild | 45 | ||||
-rw-r--r-- | python/pybind11/pybind11.info | 8 |
3 files changed, 45 insertions, 21 deletions
diff --git a/python/pybind11/README b/python/pybind11/README index 3805c59fc3..d7bc599063 100644 --- a/python/pybind11/README +++ b/python/pybind11/README @@ -1,7 +1,8 @@ -pybind11 is a lightweight header-only library that exposes C++ types in Python -and vice versa, mainly to create Python bindings of existing C++ code. -Its goals and syntax are similar to the excellent Boost.Python library by -David Abrahams: to minimize boilerplate code in traditional extension modules -by inferring type information using compile-time introspection. +pybind11 is a lightweight header-only library that exposes C++ +types in Python and vice versa, mainly to create Python bindings of +existing C++ code. Its goals and syntax are similar to the excellent +Boost.Python library by David Abrahams: to minimize boilerplate code +in traditional extension modules by inferring type information using +compile-time introspection. -This SlackBuild supports both python2 and python3. +This SlackBuild is intended for python3 only. diff --git a/python/pybind11/pybind11.SlackBuild b/python/pybind11/pybind11.SlackBuild index 8a3563d0f6..8c2162a6e8 100644 --- a/python/pybind11/pybind11.SlackBuild +++ b/python/pybind11/pybind11.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for pybind11 -# Copyright 2019 Christoph Willing, Brisbane, Australia +# Copyright 2019-2023 Christoph Willing, Brisbane, Australia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,10 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=pybind11 -VERSION=${VERSION:-2.4.3} +VERSION=${VERSION:-2.11.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,7 +39,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -70,19 +77,35 @@ 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 +mkdir build -# Python 3 support. -if $(python3 -c 'import sys' 2>/dev/null); then - python3 setup.py install --root=$PKG -fi +python3 setup.py build + +( + 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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - CONTRIBUTING.md LICENSE README.md \ + LICENSE README* docs/* \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -90,4 +113,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/python/pybind11/pybind11.info b/python/pybind11/pybind11.info index 78e7ab8209..7df93613c6 100644 --- a/python/pybind11/pybind11.info +++ b/python/pybind11/pybind11.info @@ -1,10 +1,10 @@ PRGNAM="pybind11" -VERSION="2.4.3" +VERSION="2.11.1" HOMEPAGE="https://github.com/pybind/pybind11" -DOWNLOAD="https://github.com/pybind/pybind11/archive/v2.4.3/pybind11-2.4.3.tar.gz" -MD5SUM="62254c40f89925bb894be421fe4cdef2" +DOWNLOAD="https://github.com/pybind/pybind11/archive/v2.11.1/pybind11-2.11.1.tar.gz" +MD5SUM="49e92f92244021912a56935918c927d0" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="python3" +REQUIRES="" MAINTAINER="Christoph Willing" EMAIL="chris.willing@linux.com" |