mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-14 15:50:07 +02:00
pip: update to version 23.2.1 (#9308)
Also: drop 3.8, add 3.11 support.
This commit is contained in:
@@ -1,72 +0,0 @@
|
||||
SUMMARY="The PyPA recommended tool for installing Python packages"
|
||||
DESCRIPTION="Install Python packages, replacement for easy_install"
|
||||
HOMEPAGE="https://pypi.python.org/pypi/pip"
|
||||
COPYRIGHT="2006-2022 Python Packaging Authority"
|
||||
LICENSE="Python"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://pypi.io/packages/source/p/pip/pip-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="65fd48317359f3af8e593943e6ae1506b66325085ea64b706a998c6e83eeaf38"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python38 python39 python310)
|
||||
PYTHON_VERSIONS=(3.8 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:pip$pythonVersion\n\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\n\
|
||||
setuptools_$pythonPackage\n\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
# Custom PROVIDES for the default Python version (3.9 at the moment):
|
||||
PROVIDES_python39=$PROVIDES_python39"
|
||||
cmd:pip
|
||||
cmd:pip3
|
||||
"
|
||||
|
||||
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
|
||||
|
||||
# Do not remove pip/pip3 for the default python version (3.9 at the moment).
|
||||
if [ $pythonPackage != python39 ]; then
|
||||
rm $binDir/{pip,pip3}
|
||||
fi
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$binDir
|
||||
done
|
||||
}
|
||||
82
dev-python/pip/pip-23.2.1.recipe
Normal file
82
dev-python/pip/pip-23.2.1.recipe
Normal file
@@ -0,0 +1,82 @@
|
||||
SUMMARY="The PyPA recommended tool for installing Python packages"
|
||||
DESCRIPTION="Install Python packages, replacement for easy_install"
|
||||
HOMEPAGE="https://pypi.python.org/pypi/pip"
|
||||
COPYRIGHT="2006-2023 Python Packaging Authority"
|
||||
LICENSE="Python"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.io/packages/source/p/pip/pip-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310 python311)
|
||||
PYTHON_VERSIONS=(3.9 3.10 3.11)
|
||||
defaultVersion=3.10
|
||||
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
cmd:pip$pythonVersion
|
||||
\""
|
||||
|
||||
# Provide non-suffixed cmd only for the default Python version
|
||||
if [ $pythonVersion = $defaultVersion ]; then
|
||||
eval "PROVIDES_$pythonPackage+=\"
|
||||
cmd:pip = $portVersion
|
||||
cmd:pip3 = $portVersion
|
||||
\""
|
||||
fi
|
||||
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
setuptools_$pythonPackage
|
||||
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
|
||||
|
||||
# Remove non-version suffixed commands, except for the default python version.
|
||||
if [ $pythonVersion != defaultVersion ]; then
|
||||
rm $binDir/{pip,pip3}
|
||||
fi
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$binDir
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user