aboutsummaryrefslogtreecommitdiff
path: root/python/nanobind/nanobind.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/nanobind/nanobind.SlackBuild')
-rw-r--r--python/nanobind/nanobind.SlackBuild15
1 files changed, 13 insertions, 2 deletions
diff --git a/python/nanobind/nanobind.SlackBuild b/python/nanobind/nanobind.SlackBuild
index 0217f60d7f..251182bef3 100644
--- a/python/nanobind/nanobind.SlackBuild
+++ b/python/nanobind/nanobind.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for nanobind
# Copyright 2025, Fernando Lopez Jr.
+# Copyright 2025 Jeremy Hansen <jebrhansen+SBo@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +26,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nanobind
-VERSION=${VERSION:-2.5.0}
+VERSION=${VERSION:-2.8.0}
+ROBINVER=${ROBINVER:-4ec1bf1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -71,6 +73,9 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+rmdir $PRGNAM-$VERSION/ext/robin_map
+tar xvf $CWD/robin-map-$ROBINVER*.tar.gz
+mv robin-map-$ROBINVER* $PRGNAM-$VERSION/ext/robin_map
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -85,12 +90,18 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr/lib${LIBDIRSUFFIX} \
- -DNB_USE_SUBMODULE_DEPS=OFF \
+ -DNB_USE_SUBMODULE_DEPS=ON \
-DCMAKE_BUILD_TYPE=Release ..
make
make install/strip DESTDIR=$PKG
cd ..
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
+
+python3 -m build --wheel --no-isolation
+python3 -m installer --destdir "$PKG" dist/*.whl
+
#rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \