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 }