mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
81 lines
1.9 KiB
Bash
81 lines
1.9 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="4"
|
|
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$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
sqlite${secondaryArchSuffix}_devel >= 3.36
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.10)
|
|
defaultVersion=3.10
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_$pythonPackage=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
eval "PROVIDES_$pythonPackage+=\"
|
|
apsw_$pythonPackage = $portVersion
|
|
\""
|
|
fi
|
|
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku$secondaryArchSuffix
|
|
lib:libsqlite3$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
setuptools_$pythonPackage
|
|
devel:libsqlite3$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
cmd:gcc$secondaryArchSuffix
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
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
|
|
}
|