diff --git a/CHANGELOG.md b/CHANGELOG.md index 0094fc59..8f728fc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ Until May 2022 (inclusive) no changelog was kept. We might try to reconstruct it * GSL: Update to 2.8 for ROOT compatibility * libpng: update to 1.6.47 * FairRoot: Update to 19.0.0 +* Python: Update to 3.12.12, unpin most python packages, add distro package to + fix aliBuild architecture detection ### Removed diff --git a/python-modules-list.sh b/python-modules-list.sh index 0c519ea1..b11bd1c6 100644 --- a/python-modules-list.sh +++ b/python-modules-list.sh @@ -2,132 +2,35 @@ package: Python-modules-list version: "1.0" env: PIP_BASE_REQUIREMENTS: | - pip==25.0.1 - setuptools==59.6.0 - wheel==0.37.1 + pip>=25.3 + setuptools>=80.10.1 + wheel>=0.45.1 + distro>=1.9.0 PIP_REQUIREMENTS: | - requests==2.27.1 - ipykernel==5.1.0 - ipython==7.4.0 - ipywidgets==7.4.2 - metakernel==0.20.14 - mock==2.0.0 - notebook==5.7.8 - scons==4.1.0 - PIP36_REQUIREMENTS: | - PyYAML==6.0.1 - psutil==5.8.0 - uproot==4.1.0 - numpy==1.16.2 - scipy==1.2.1 - Cython==0.29.16 - seaborn==0.9.0 - sklearn-evaluation==0.4 - Keras==2.2.4 - tensorflow==1.13.1 - xgboost==0.82 - dryable==1.0.3 - responses==0.10.6 - pandas==0.24.2 - scikit-learn==0.20.3 - PIP38_REQUIREMENTS: | - PyYAML==6.0.1 - psutil==5.8.0 - uproot==4.1.0 - scipy==1.6.1 - Cython==0.29.21 - seaborn==0.9.0 - sklearn-evaluation==0.4 - Keras==2.4.3 - tensorflow==2.4.1 - xgboost==1.3.3 - numpy==1.19.5 - dryable==1.0.3 - responses==0.10.6 - pandas==1.2.3 - scikit-learn==0.24.1 - PIP39_REQUIREMENTS: | - PyYAML==6.0.1 - psutil==5.8.0 - uproot==4.1.0 - numpy==1.21.6 - scipy==1.7.3 - Cython==0.29.21 - seaborn==0.11.0 - scikit-learn==0.24.1 - sklearn-evaluation==0.5.2 - Keras==2.4.3 - xgboost==1.2.0 - dryable==1.0.5 - responses==0.10.6 - pandas==1.1.5 - future - "PIP39_REQUIREMENTS_ubuntu2110_x86_64": | - PyYAML==6.0.1 - psutil==5.8.0 - uproot==4.1.0 - numpy==1.21.4 - scipy==1.7.3 - Cython==0.29.21 - seaborn==0.11.0 - scikit-learn==0.24.1 - sklearn-evaluation==0.5.2 - Keras==2.4.3 - xgboost==1.2.0 - dryable==1.0.5 - responses==0.10.6 - pandas==1.1.5 - # Keep the PIPxy version in sync with the Conda env we install in Python-modules! - # Everything but the first two lines copied from PIP39_REQUIREMENTS, but with versions - # adjusted such that wheels are available and for compatibility with tensorflow. - PIP39_REQUIREMENTS_osx_arm64: | - tensorflow-macos==2.13.0 - tensorflow-metal==1.0.1 - PyYAML==6.0.1 - psutil==5.9.5 - uproot==4.1.0 - numpy==1.23.5 - scipy==1.10.1 - Cython==0.29.21 - seaborn==0.11.0 - scikit-learn==1.2.2 - sklearn-evaluation==0.12.0 - Keras==2.13.1 - xgboost==1.7.5 - dryable==1.0.5 - responses==0.10.6 - pandas==1.5.3 - PIP310_REQUIREMENTS: | - PyYAML==6.0.1 - psutil==5.9.0 - uproot==4.1.0 - numpy==1.23.5 - scipy==1.9.3 - Cython==0.29.21 - seaborn==0.11.0 - scikit-learn>=0.24.1 - sklearn-evaluation>=0.8.1 - Keras==2.4.3 - xgboost==1.2.0 - dryable==1.0.5 - responses==0.10.6 - pandas==1.5.3 - PIP311_REQUIREMENTS: | - PyYAML==6.0.1 - psutil==5.9.5 - uproot==4.1.0 - numpy==1.23.5 - scipy==1.10.1 - Cython==0.29.21 - seaborn==0.11.0 - scikit-learn==1.3.0 - sklearn-evaluation==0.12.0 - Keras==2.13.1 - xgboost==1.7.5 - dryable==1.0.5 - responses==0.10.6 - pandas==1.5.3 - pybind11==2.13.6 + requests>=2.32.5 + ipykernel>=7.1.0 + ipython>=9.9.0 + ipywidgets>=8.1.8 + metakernel>=0.30.4 + mock>=5.2.0 + notebook>=7.5.2 + scons>=4.10.1 + PIP312_REQUIREMENTS: | + PyYAML>=6.0.3 + psutil>=7.2.1 + uproot>=5.6.9 + numpy>=2.4.1 + scipy>=1.17.0 + Cython>=3.2.4 + seaborn>=0.13.2 + scikit-learn>=1.8.0 + sklearn-evaluation>=0.12.2 + Keras>=3.13.1 + xgboost>=3.1.3 + dryable>=1.2.0 + responses>=0.25.8 + pandas>=3.0.0 + pybind11>=3.0.1 build_requires: - alibuild-recipe-tools --- diff --git a/python-modules.sh b/python-modules.sh index 4b7224d7..9cc11afe 100644 --- a/python-modules.sh +++ b/python-modules.sh @@ -45,7 +45,7 @@ case $ARCHITECTURE in esac # Major.minor version of Python -pyver="$(python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_version())')" +pyver="$(python3 -c 'import sysconfig; print(sysconfig.get_python_version())')" # These are the basic requirements needed for all installation and platform # and it should represent the common denominator (working) for all packages/platforms diff --git a/python.sh b/python.sh index c1e3d7b9..2fe18f34 100644 --- a/python.sh +++ b/python.sh @@ -1,6 +1,6 @@ package: Python version: "%(tag_basename)s" -tag: v3.9.16 +tag: v3.12.12 source: https://github.com/python/cpython requires: - FreeType @@ -16,13 +16,34 @@ env: PYTHONHOME: "$PYTHON_ROOT" PYTHONPATH: "$PYTHON_ROOT/lib/python/site-packages" prefer_system: "(?!slc5|ubuntu)" -prefer_system_check: - python3 -c 'import sys; import sqlite3; sys.exit(1 if sys.version_info < (3, 5) else 0)' && python3 -m pip --help > /dev/null && printf '#include "pyconfig.h"' | cc -c $(python3-config --includes) -xc -o /dev/null -; if [ $? -ne 0 ]; then printf "Python, the Python development packages, and pip must be installed on your system.\nUsually those packages are called python, python-devel (or python-dev) and python-pip.\n"; exit 1; fi +prefer_system_check: | + python3 -c 'from sys import version_info; print(f"alibuild_system_replace: python{version_info.major}.{version_info.minor}")' + python3 -c 'import sys; import sqlite3; sys.exit(1 if sys.version_info < (3, 9) or sys.version_info > (3, 15) else 0)' && python3 -m pip --help > /dev/null && printf '#include "pyconfig.h"' | cc -c $(python3-config --includes) -xc -o /dev/null -; if [ $? -ne 0 ]; then printf "Python, the Python development packages, and pip must be installed on your system.\nUsually those packages are called python, python-devel (or python-dev) and python-pip.\n"; exit 1; fi +prefer_system_replacement_specs: + "python-brew3.*": + version: "%(key)s" + env: + PYTHON_ROOT: $(brew --prefix python3) + PYTHON_REVISION: "" + "python3.*": + version: "%(key)s" + env: + # Python is in path, so we need a dummy placeholder for PYTHON_ROOT + # to avoid having /bin in the middle of the path. + PYTHON_ROOT: "/dummy-python-folder" + PYTHON_REVISION: "" --- rsync -av --exclude '**/.git' $SOURCEDIR/ $BUILDDIR/ # According to cmsdist, this is required to pick up our own version export LIBFFI_ROOT +export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:${PKG_CONFIG_PATH} + +# If the python installer finds another pip, it won't install the new one +export PATH=$(echo $PATH | awk -v RS=':' -v ORS=':' '!/python/ {print}' | sed 's/:$//') +unset PYTHONUSERBASE +unset PYTHONHOME +unset PYTHONPATH # The only way to pass externals to Python LDFLAGS= @@ -34,27 +55,7 @@ done export LDFLAGS=$(echo $LDFLAGS) export CPPFLAGS=$(echo $CPPFLAGS) -case $ARCHITECTURE in - osx*) [[ ! $OPENSSL_ROOT ]] && OPENSSL_ROOT=$(brew --prefix openssl@3) ;; -esac - -# Set own OpenSSL if appropriate -if [[ $OPENSSL_ROOT ]]; then - export CPATH="$OPENSSL_ROOT/include:$OPENSSL_ROOT/include/openssl:$CPATH" - export CPPFLAGS="-I$OPENSSL_ROOT/include -I$OPENSSL_ROOT/include/openssl $CPPFLAGS" - export CFLAGS="-I$OPENSSL_ROOT/include -I$OPENSSL_ROOT/include/openssl" - cat >> Modules/Setup.dist <