brotli: don't use $pythonVersion in REQUIRES_python* and BUILD_*.

The initial changes in brotli and pycurl to get rid of the "2.7"
and "3.6" were working on my system... but not on the buildbots.
Unfortunately, the fixes to get the recipes also work with the
buildbots have a small drawback: the dependencies evaluated at
build time are no longer tied with the minor version of Python.

So let's not replicate these changes to other recipes for now.
This commit is contained in:
fbrosson
2018-10-21 21:18:21 +00:00
parent ac9b1cfde2
commit c95c1a987c

View File

@@ -55,43 +55,44 @@ BUILD_PREREQUIRES="
"
PYTHON_PACKAGES=()
PYTHON_LIBSUFFIXES=()
PYTHON_MAJOR_VERSIONS=()
PYTHON_VERSIONS=()
# We don't have python2 for secondaryArch,
if [ -z "$secondaryArchSuffix" ]; then
PYTHON_PACKAGES+=(python)
PYTHON_LIBSUFFIXES+=("")
PYTHON_MAJOR_VERSIONS+=(2)
BUILD_REQUIRES+="
setuptools_python
"
BUILD_PREREQUIRES+="
cmd:python2
"
fi
# gcc2 does not support the flags passed by python3
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
PYTHON_PACKAGES+=(python3)
PYTHON_LIBSUFFIXES+=(m)
PYTHON_MAJOR_VERSIONS+=(3)
BUILD_REQUIRES+="
setuptools_python3
"
BUILD_PREREQUIRES+="
cmd:python3
"
fi
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonLibSuffix=${PYTHON_LIBSUFFIXES[$i]}
pythonVersion="`$pythonPackage --version 2>&1 | sed \
-e "s/Python \([[:digit:]]*\.[[:digit:]]*\)\..*/\1/"`"
pythonMajorVersion=${PYTHON_MAJOR_VERSIONS[$i]}
pythonVersion=`eval "$pythonPackage --version 2>&1" | sed -n \
-e "1s/Python \([0-9]*\.[0-9]*\)\..*/\1/p"`
PYTHON_VERSIONS+=($pythonVersion)
eval "\
PROVIDES_${pythonPackage}=\"\n\
${portName}_$pythonPackage = $portVersion\n\
\"; \
REQUIRES_$pythonPackage=\"\n\
haiku$secondaryArchSuffix\n\
cmd:python$pythonVersion\n\
lib:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix\n\
\"\
"
BUILD_REQUIRES+="
setuptools_$pythonPackage
devel:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
cmd:python$pythonMajorVersion
\""
done
BUILD()