mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
cram: switch to Python 3.9. (#8725)
- Dropped Python2 version. - No need to version-suffix cmd:cram. Notice: upstream repo has been archived in 2022, and while the repo mentions an 0.8 release, the link for that is broken, and no 0.8 tag exists on its git repo. Considering only one package in HaikuPorts needs cmd:cram (the silver searcher, and only for its `TEST()`)... impact of these changes is pretty minimal. (Will fix "the silver searcher"'s recipe next).
This commit is contained in:
@@ -6,60 +6,48 @@ the command's actual output."
|
||||
HOMEPAGE="https://bitheap.org/cram/"
|
||||
COPYRIGHT="2010-2016 Rafael G. Martins"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://bitheap.org/cram/cram-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="7da7445af2ce15b90aad5ec4792f857cef5786d71f14377e9eb994d8b8337f2f"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
# It only makes sense to package this one just for the default Python version.
|
||||
pythonVersion=3.9
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
cmd:cram = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
setuptools_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
TEST_REQUIRES="
|
||||
cmd:cram
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python3)
|
||||
PYTHON_VERSIONS=(2.7 3.7)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\n\
|
||||
cmd:${portName}${pythonVersion%%.*} = $portVersion\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$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
|
||||
|
||||
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
|
||||
mkdir -p $installLocation
|
||||
|
||||
mv $prefix/bin/cram $prefix/bin/cram${pythonVersion%%.*}
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/bin \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
$python setup.py build install --root=/ --prefix=$prefix
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cram tests/*.t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user