Files
haikuports/dev-python/apsw/apsw-3.36.0~r1.recipe
OscarL 70ac5cadda python3.8: bulk removal of now obsolete "_python38" packages. (#9328)
* python3.8: bulk removal of now obsolete "_python38" packages.

Done via scripting. No functional change intended or expected.

Some manual tweaks will follow.

* python3.8: further manual tweaks after bulk-3.8-removal.

Unlike the previous commit with automated changes,
I've tested builds for *these* recipes in beta4 64 bits.
2023-09-01 18:19:50 +00:00

74 lines
2.0 KiB
Bash

SUMMARY="Another Python SQLite Wrapper"
DESCRIPTION="A Python wrapper for the SQLite embedded relational database \
engine. In contrast to other wrappers such as pysqlite it focuses on being a \
minimal layer over SQLite attempting just to translate the complete SQLite \
API into Python."
HOMEPAGE="https://github.com/rogerbinns/apsw/
https://pypi.org/project/apsw/"
COPYRIGHT="2004-2021 Roger Binns"
LICENSE="OSI"
REVISION="3"
SOURCE_URI="https://github.com/rogerbinns/apsw/archive/3.36.0-r1.tar.gz"
CHECKSUM_SHA256="133ee2291851e0144661eba25517c7feb026c6d5896df90ef7ea0feddf03a842"
SOURCE_DIR="apsw-3.36.0-r1"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
lib:libsqlite3$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
sqlite${secondaryArchSuffix}_devel >= 3.36
"
PYTHON_PACKAGES=(python39 python310)
PYTHON_VERSIONS=(3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku$secondaryArchSuffix\n\
cmd:python$pythonVersion\
\""
if [ "$targetArchitecture" = "x86_gcc2" ]; then
eval "PROVIDES_${pythonPackage}+=\"\n\
apsw_$pythonPackage = $portVersion\
\""
fi
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage
devel:libsqlite3$secondaryArchSuffix"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion
cmd:gcc$secondaryArchSuffix"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build_ext --enable=load_extension install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}