Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sphinx(python), add new/updated dependency python recipes #8775

Merged
merged 10 commits into from Jun 3, 2023
70 changes: 70 additions & 0 deletions dev-python/alabaster/alabaster-0.7.13.recipe
@@ -0,0 +1,70 @@
SUMMARY="A configurable sidebar-enabled Sphinx theme"
DESCRIPTION="Alabaster is a visually (c)lean, responsive, configurable theme for the Sphinx \
documentation system. It is Python 3.6+ compatible.

It began as a third-party theme, and is still maintained separately, but as of Sphinx 1.3, \
Alabaster is an install-time dependency of Sphinx and is selected as the default theme."
HOMEPAGE="https://github.com/sphinx-doc/alabaster"
COPYRIGHT="2020 Jeff Forcier
2011 Kenneth Reitz
2010 Armin Ronacher"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="c5efad86e1bb8215d037e2890e62aa2bb5e4f13f6fa455be100413835b5bfe43"
SOURCE_FILENAME="alabaster-$portVersion.tar.gz"

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
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
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

packageEntries $pythonPackage \
$prefix/lib/python*
done
}
67 changes: 0 additions & 67 deletions dev-python/babel/babel-2.10.3.recipe

This file was deleted.

88 changes: 88 additions & 0 deletions dev-python/babel/babel-2.12.1.recipe
@@ -0,0 +1,88 @@
SUMMARY="A collection of tools for internationalizing Python applications"
DESCRIPTION="Babel is a Python library that provides an integrated \
collection of utilities that assist with internationalizing and localizing \
Python applications (in particular web-based applications.)"
HOMEPAGE="http://babel.pocoo.org/"
COPYRIGHT="2013-2022 by the Babel Team"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/python-babel/babel/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="37de3435fdec7c3267430765fc3ebe05cd234e65774ff1dc42a7b3b5cd39ef97"
SOURCE_FILENAME="babel-v$portVersion.tar.gz"
SOURCE_URI_2="https://unicode.org/Public/cldr/42/cldr-common-42.0.zip#noarchive"
CHECKSUM_SHA256_2="53cd4fd1ac2ee4d4cbcae362e7af5d02e98e5e39c826ce9d723d41ca836fc846"

ARCHITECTURES="any"

PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"

BUILD_REQUIRES="
haiku_devel
"

PYTHON_PACKAGES=(python39 python310)
PYTHON_VERSIONS=(3.9 3.10)
defaultVersion=3.9
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}

eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
cmd:pybabel_$pythonVersion = $portVersion
\""
# Provide non-suffixed cmd only for the default Python version
if [ $pythonVersion = $defaultVersion ]; then
eval "PROVIDES_$pythonPackage+=\"
cmd:pybabel = $portVersion
\""
fi

eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
setuptools_$pythonPackage
\""

BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage
"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion
"
done

INSTALL()
{
cp $sourceDir2/* cldr
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 import_cldr build install \
--root=/ --prefix=$prefix

# Version suffix the script
mv $prefix/bin/pybabel $prefix/bin/pybabel-$pythonVersion

# And provide suffix-less symlink for the default version
if [ $pythonVersion = $defaultVersion ]; then
ln -sr $prefix/bin/pybabel-$pythonVersion $prefix/bin/pybabel
fi

packageEntries $pythonPackage \
$prefix/lib/python* \
$prefix/bin

done
}
77 changes: 77 additions & 0 deletions dev-python/filelock/filelock-3.12.0.recipe
@@ -0,0 +1,77 @@
SUMMARY="A platform independent file lock"
DESCRIPTION="This package contains a single module, which implements a platform independent file \
lock in Python, which provides a simple way of inter-process communication."
HOMEPAGE="https://github.com/tox-dev/py-filelock"
COPYRIGHT="2023 Bernát Gábor"
LICENSE="Unlicense"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="4a26dad7207539e765a1f7a3cdbce868b5a266120366b660f1736f8955bc3ccb"
SOURCE_FILENAME="filelock-$portVersion.tar.gz"
SOURCE_DIR="py-filelock-$portVersion"

ARCHITECTURES="any"

PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"

BUILD_REQUIRES="
haiku_devel
"

PYTHON_PACKAGES=(python39 python310)
PYTHON_VERSIONS=(3.9 3.10)
defaultTestVersion="python39"
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}

eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
hatch_vcs_$pythonPackage
hatchling_$pythonPackage
installer_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done

TEST_REQUIRES="
filelock_$defaultTestVersion
pytest_mock_$defaultTestVersion
cmd:pytest
"

INSTALL()
{
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion

for i in "${!PYTHON_PACKAGES[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}

python=python$pythonVersion

$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer -p $prefix dist/*.whl

packageEntries ${PYTHON_PACKAGES[i]} \
$prefix/lib/python*
done
}

TEST()
{
pytest -v
}
24 changes: 24 additions & 0 deletions dev-python/filelock/licenses/Unlicense
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org>