mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 22:00:09 +02:00
mock, drop python2.7, add python3.10 (#7178)
This commit is contained in:
@@ -14,7 +14,7 @@ testing, particularly monkey patching."
|
||||
HOMEPAGE="http://pypi.python.org/pypi/mock"
|
||||
COPYRIGHT="2003-2012, Michael Foord"
|
||||
LICENSE="BSD (2-clause)"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://pypi.python.org/packages/source/m/mock/mock-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="7d3fbbde18228f4ff2f1f119a45cdffa458b4c0dee32eb4d2bb2f82554bac7bc"
|
||||
|
||||
@@ -31,8 +31,8 @@ BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python3 python38 python39)
|
||||
PYTHON_VERSIONS=(2.7 3.7 3.8 3.9)
|
||||
PYTHON_PACKAGES=(python3 python38 python39 python310)
|
||||
PYTHON_VERSIONS=(3.7 3.8 3.9 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
@@ -49,24 +49,6 @@ BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
BUILD()
|
||||
{
|
||||
rm -rf build*
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
# GENERIC: all python_setuptools-based installs need this
|
||||
python=$portPackageLinksDir/cmd~python$pythonVersion/bin/python$pythonVersion
|
||||
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
|
||||
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
|
||||
$python setup.py build
|
||||
mv build build$pythonVersion
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
@@ -77,9 +59,8 @@ INSTALL()
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
mkdir -p $installLocation
|
||||
|
||||
mv build$pythonVersion build
|
||||
$python setup.py install \
|
||||
rm -rf build
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
|
||||
Reference in New Issue
Block a user