mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
pybind11: update to version 2.13.6. (#11782)
Update needed by scipy 1.15.1. Cleaned up recipe, drop Python 3.9.
This commit is contained in:
@@ -8,10 +8,9 @@ by inferring type information using compile-time introspection."
|
||||
HOMEPAGE="https://pypi.org/project/pybind11/"
|
||||
COPYRIGHT="2015-2023 Wenzel Jakob"
|
||||
LICENSE="BSD (2-clause)"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/pybind/pybind11/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c"
|
||||
SOURCE_FILENAME="pybind11-v$portVersion.tar.gz"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/p/pybind11/pybind11-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="ba6af10348c12b24e92fa086b39cfba0eff619b61ac77c406167d813b096d39a"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -23,12 +22,12 @@ REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
defaultVersion=3.10
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
@@ -52,32 +51,35 @@ for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
\""
|
||||
BUILD_REQUIRES+="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
build_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
setuptools_$pythonPackage
|
||||
devel:eigen$secondaryArchSuffix
|
||||
wheel_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:cmake # setup.py calls cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
BUILD()
|
||||
{
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
python=python$pythonVersion
|
||||
|
||||
$python -m build --wheel --skip-dependency-check --no-isolation
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
|
||||
mkdir -p $installLocation #$prefix/lib/cmake
|
||||
rm -rf build
|
||||
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
$python -m installer --p $prefix dist/*-$portVersion-*.whl
|
||||
|
||||
# Version suffix pybind11-config
|
||||
mv $prefix/bin/pybind11-config $prefix/bin/pybind11-config-$pythonVersion
|
||||
@@ -87,19 +89,7 @@ INSTALL()
|
||||
ln -sr $prefix/bin/pybind11-config-$pythonVersion $prefix/bin/pybind11-config
|
||||
fi
|
||||
|
||||
# Not sure we want to run cmake build
|
||||
# this will install the headers and cmake files double
|
||||
# cmake -B build $cmakeDirArgs \
|
||||
# -DCMAKE_BUILD_TYPE=None \
|
||||
# -DPYBIND11_PYTHON_VERSION=$pythonVersion \
|
||||
# -DPYBIND11_TEST=OFF \
|
||||
# -DUSE_PYTHON_INCLUDE_DIR=OFF
|
||||
# make -C build install
|
||||
|
||||
# mv $dataDir/cmake/pybind11 $prefix/lib/cmake
|
||||
# rm -rf $dataDir
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/bin \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
Reference in New Issue
Block a user