mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
alembic_py: update to version 1.13.2, fixed dependencies. (#11128)
Not sure if this needs a "_python3x" package, or we could just provide it as a standalone "cmd:alembic". For now, leave it like this.
This commit is contained in:
89
dev-python/alembic/alembic_py-1.13.2.recipe
Normal file
89
dev-python/alembic/alembic_py-1.13.2.recipe
Normal file
@@ -0,0 +1,89 @@
|
||||
SUMMARY="Database migration tool for SQLAlchemy"
|
||||
DESCRIPTION="A database migrations tool written by the author of SQLAlchemy. \
|
||||
It offers the following functionality:
|
||||
* Can emit ALTER statements to a database in order to change the structure of \
|
||||
tables and other constructs
|
||||
* Provides a system whereby “migration scripts” may be constructed; each \
|
||||
script indicates a particular series of steps that can “upgrade” a target \
|
||||
database to a new version, and optionally a series of steps that can \
|
||||
“downgrade” similarly, doing the same steps in reverse.
|
||||
* Allows the scripts to execute in some sequential manner."
|
||||
HOMEPAGE="https://pypi.org/project/alembic/"
|
||||
COPYRIGHT="2009-2024 Michael Bayer"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.python.org/packages/source/a/alembic/alembic-$portVersion.tar.gz"
|
||||
SOURCE_DIR="alembic-$portVersion"
|
||||
CHECKSUM_SHA256="1ff0ae32975f4fd96028c39ed9bb3c867fe3af956bd7bb37343b54c9fe7445ef"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
defaultVersion=3.10
|
||||
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
cmd:alembic$pythonVersion = $portVersion
|
||||
\""
|
||||
|
||||
if [ $pythonVersion = $defaultVersion ]; then
|
||||
eval "PROVIDES_${pythonPackage}+=\"
|
||||
cmd:alembic = $portVersion
|
||||
\""
|
||||
fi
|
||||
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
mako_$pythonPackage
|
||||
sqlalchemy_$pythonPackage
|
||||
typing_extensions_$pythonPackage
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES+="
|
||||
build_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
setuptools_$pythonPackage
|
||||
wheel_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
python=python$pythonVersion
|
||||
|
||||
$python -m build --wheel --skip-dependency-check --no-isolation
|
||||
$python -m installer -p $prefix dist/*.whl
|
||||
|
||||
# Version suffix the script, and provide suffixless version for the default one.
|
||||
mv $binDir/alembic $binDir/alembic$pythonVersion
|
||||
if [ $pythonVersion = $defaultVersion ]; then
|
||||
ln -sr $binDir/alembic$pythonVersion $binDir/alembic
|
||||
fi
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$binDir
|
||||
done
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
SUMMARY="Database migration tool for SQLAlchemy"
|
||||
DESCRIPTION="A database migrations tool written by the author of SQLAlchemy. \
|
||||
It offers the following functionality:
|
||||
* Can emit ALTER statements to a database in order to change the structure of \
|
||||
tables and other constructs
|
||||
* Provides a system whereby “migration scripts” may be constructed; each \
|
||||
script indicates a particular series of steps that can “upgrade” a target \
|
||||
database to a new version, and optionally a series of steps that can \
|
||||
“downgrade” similarly, doing the same steps in reverse.
|
||||
* Allows the scripts to execute in some sequential manner."
|
||||
HOMEPAGE="https://pypi.org/project/alembic/"
|
||||
COPYRIGHT="2011-2019 Mike Bayer"
|
||||
LICENSE="MIT"
|
||||
REVISION="6"
|
||||
SOURCE_URI="https://pypi.python.org/packages/source/a/alembic/alembic-$portVersion.tar.gz"
|
||||
SOURCE_DIR="alembic-$portVersion"
|
||||
CHECKSUM_SHA256="a2d4d90da70b30e70352cd9455e35873a255a31402a438fe24815758d7a0e5e1"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
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\n\
|
||||
cmd:alembic$pythonVersion\n\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
importlib_metadata_$pythonPackage\n\
|
||||
importlib_resources_$pythonPackage\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
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 install \
|
||||
--root=/ --prefix=$prefix
|
||||
mv $binDir/alembic $binDir/alembic$pythonVersion
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$binDir
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user