mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
urllib3: cleanups, drop Python 3.9 support.
This commit is contained in:
@@ -18,7 +18,7 @@ HOMEPAGE="https://urllib3.readthedocs.io/
|
||||
https://github.com/urllib3/urllib3"
|
||||
COPYRIGHT="2008-2018 Andrey Petrov and contributors"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/shazow/urllib3/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="521d99f682649c3fe417aff824add6ecf18bbf83113bb5171f5d8a50886599d3"
|
||||
SOURCE_FILENAME="urllib3-$portVersion.tar.gz"
|
||||
@@ -36,42 +36,46 @@ 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\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
|
||||
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
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]}
|
||||
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 install \
|
||||
--root=/ --prefix="$prefix"
|
||||
|
||||
install -m 755 -d "$docDir"
|
||||
install -m 644 -t "$docDir" README.rst
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix"/lib/$python \
|
||||
"$docDir"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user