diff --git a/boost-toolfile.spec b/boost-toolfile.spec index dad30f3cb38..4a14bedd26e 100644 --- a/boost-toolfile.spec +++ b/boost-toolfile.spec @@ -154,6 +154,5 @@ export BOOST_REGEX_LIB=`getLibName regex` export BOOST_SERIALIZATION_LIB=`getLibName serialization` export BOOST_IOSTREAMS_LIB=`getLibName iostream` export BOOST_MPI_LIB=`getLibName mpi` -export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) ## IMPORT scram-tools-post diff --git a/coral-tool-conf.spec b/coral-tool-conf.spec index a1164f5db60..3aac1c35c68 100644 --- a/coral-tool-conf.spec +++ b/coral-tool-conf.spec @@ -2,7 +2,7 @@ ## NOCOMPILER Requires: pcre-toolfile -Requires: python-toolfile +Requires: python3-toolfile Requires: expat-toolfile Requires: boost-toolfile Requires: frontier_client-toolfile diff --git a/coral-toolfile.spec b/coral-toolfile.spec index d3101ab96cf..cc68b60b533 100644 --- a/coral-toolfile.spec +++ b/coral-toolfile.spec @@ -1,4 +1,4 @@ -### RPM external coral-toolfile 1.0 +### RPM external coral-toolfile 2.0 Requires: coral %prep @@ -14,8 +14,8 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/coral.xml - - + + diff --git a/coral.spec b/coral.spec index 153b353fde3..90b7747d394 100644 --- a/coral.spec +++ b/coral.spec @@ -1,6 +1,6 @@ ### RPM cms coral CORAL_2_3_21 -%define tag 03471dd59bed93d6e20ad6c4b6258d3f65821066 -%define branch cms/%{realversion} +%define tag c5ddd97499d6a76f24cba6800e5cb88887764bcb +%define branch cms/%{realversion}py3 %define github_user cms-externals Patch0: coral-2_3_20-macosx diff --git a/cuda.spec b/cuda.spec index f330a9ad423..982cacf0269 100644 --- a/cuda.spec +++ b/cuda.spec @@ -12,7 +12,7 @@ Source0: https://developer.download.nvidia.com/compute/cuda/%{realversion}/local %ifarch aarch64 Source0: https://developer.download.nvidia.com/compute/cuda/%{realversion}/local_installers/%{n}_%{realversion}_%{driversversion}_linux_sbsa.run %endif -Requires: python +Requires: python3 AutoReq: no %prep @@ -72,7 +72,7 @@ mv %_builddir/build/share/ %{i}/ mv %{i}/bin/cuda-gdb %{i}/bin/cuda-gdb.real cat > %{i}/bin/cuda-gdb << @EOF #! /bin/bash -export PYTHONHOME=$PYTHON_ROOT +export PYTHONHOME=$PYTHON3_ROOT exec %{i}/bin/cuda-gdb.real "\$@" @EOF chmod a+x %{i}/bin/cuda-gdb diff --git a/fastjet-toolfile.spec b/fastjet-toolfile.spec index 2568c687d8f..2755dc541be 100644 --- a/fastjet-toolfile.spec +++ b/fastjet-toolfile.spec @@ -30,7 +30,6 @@ done cat << \EOF_TOOLFILE >>%i/etc/scram.d/%{base_package}.xml - EOF_TOOLFILE diff --git a/fastjet.spec b/fastjet.spec index bad10722163..38811795e35 100644 --- a/fastjet.spec +++ b/fastjet.spec @@ -1,5 +1,5 @@ ### RPM external fastjet 3.4.0-beta -## INITENV +PATH PYTHON27PATH %{i}/${PYTHON_LIB_SITE_PACKAGES} +## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} ## INCLUDE compilation_flags BuildRequires: autotools diff --git a/frontier_client.spec b/frontier_client.spec index ec1e7f38cef..2ec030a72eb 100644 --- a/frontier_client.spec +++ b/frontier_client.spec @@ -1,5 +1,4 @@ ### RPM external frontier_client 2.9.1 -## INITENV +PATH PYTHON27PATH %{i}/python/lib ## INITENV +PATH PYTHON3PATH %{i}/python/lib %define tag 888a611d4ab15d6ce03830c63b850539460dcda9 diff --git a/gosam-toolfile.spec b/gosam-toolfile.spec index 7f205621f17..98f900bad9c 100644 --- a/gosam-toolfile.spec +++ b/gosam-toolfile.spec @@ -17,6 +17,4 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/gosam.xml EOF_TOOLFILE -export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) - ## IMPORT scram-tools-post diff --git a/llvm-gcc-toolfile.spec b/llvm-gcc-toolfile.spec index 703a1478161..71cd8ebbd62 100644 --- a/llvm-gcc-toolfile.spec +++ b/llvm-gcc-toolfile.spec @@ -145,7 +145,6 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/pyclang.xml EOF_TOOLFILE -export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) # NON-empty defaults # First of all handle OS specific options. diff --git a/llvm.spec b/llvm.spec index 4f77a6cdbba..167f8039d3e 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,6 +1,6 @@ ### RPM external llvm 12.0.0 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 -## INITENV +PATH PYTHON3PATH %{i}/lib64/python`echo $PYTHON3_VERSION | cut -d. -f 1,2`/site-packages +## INITENV +PATH PYTHON3PATH %{i}/lib64/python%{cms_python3_major_minor_version}/site-packages BuildRequires: cmake ninja Requires: gcc zlib python3 @@ -62,7 +62,7 @@ bin/clang-tidy --checks=* --list-checks | grep cms-handle cd ../build ninja -v %{makeprocesses} install -BINDINGS_PATH=%{i}/lib64/python$(echo $PYTHON3_VERSION | cut -d. -f 1,2)/site-packages +BINDINGS_PATH=%{i}/lib64/python%{cms_python3_major_minor_version}/site-packages mkdir -p $BINDINGS_PATH cp -r %{_builddir}/llvm-%{realversion}-%{llvmCommit}/clang/bindings/python/clang $BINDINGS_PATH diff --git a/pip/python-ldap.file b/pip/python-ldap.file index adc074d3e79..bde6b448ab1 100644 --- a/pip/python-ldap.file +++ b/pip/python-ldap.file @@ -1,2 +1,2 @@ -Requires: python openldap py3-pyasn1-modules -%define PipBuildOptions --global-option=build_ext --global-option="-L${PYTHON_ROOT}/lib" --global-option="-L${OPENLDAP_ROOT}/lib" --global-option="-I${PYTHON_ROOT}/include" --global-option="-I${OPENLDAP_ROOT}/include" --global-option="-UHAVE_SASL" +Requires: openldap py3-pyasn1-modules +%define PipBuildOptions --global-option=build_ext --global-option="-L${PYTHON3_ROOT}/lib" --global-option="-L${OPENLDAP_ROOT}/lib" --global-option="-I${PYTHON3_ROOT}/include" --global-option="-I${OPENLDAP_ROOT}/include" --global-option="-UHAVE_SASL" diff --git a/professor2-toolfile.spec b/professor2-toolfile.spec index 23b472786f7..eea1e0b852b 100644 --- a/professor2-toolfile.spec +++ b/professor2-toolfile.spec @@ -21,6 +21,4 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/professor2.xml EOF_TOOLFILE -export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) - ## IMPORT scram-tools-post diff --git a/professor2.spec b/professor2.spec index ab75e8594b9..fa2407cd8c4 100644 --- a/professor2.spec +++ b/professor2.spec @@ -1,5 +1,5 @@ ### RPM external professor2 2.3.2 -## INITENV +PATH PYTHON27PATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages +## INITENV +PATH PYTHON3PATH %i/lib/python%{cms_python3_major_minor_version}/site-packages Source: http://www.hepforge.org/archive/professor/Professor-%{realversion}.tar.gz Requires: py3-matplotlib root yoda eigen @@ -14,11 +14,13 @@ Patch0: professor2-ppc64-flag-change %patch0 -p1 %endif +%define build_flags CPPFLAGS=-I${EIGEN_ROOT}/include/eigen3 PYTHON=$(which python3) + %build -make CPPFLAGS=-I${EIGEN_ROOT}/include/eigen3 +make %{build_flags} %install -make install PREFIX=%{i} +make install PREFIX=%{i} %{build_flags} -find %{i} -type f -exec sed -ideleteme '1 { s|^#!.*/bin/python|#!/usr/bin/env python| }' {} \; +find %{i} -type f -exec sed -ideleteme '1 { s|^#!.*/bin/python.*|#!/usr/bin/env python3| }' {} \; find %{i} -name '*deleteme' -delete diff --git a/python-toolfile.spec b/python-toolfile.spec index c247741517f..b0b6df64b18 100644 --- a/python-toolfile.spec +++ b/python-toolfile.spec @@ -13,8 +13,8 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/python.xml - - + + diff --git a/python3-toolfile.spec b/python3-toolfile.spec index 41a918de273..8e926d7f722 100644 --- a/python3-toolfile.spec +++ b/python3-toolfile.spec @@ -13,18 +13,14 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/python3.xml - - + + EOF_TOOLFILE - -# -# - export PYTHON3V=$(echo $PYTHON3_VERSION | cut -f1,2 -d.) ## IMPORT scram-tools-post diff --git a/python_tools.spec b/python_tools.spec index d4fc7f0b7a4..4dbcc148016 100644 --- a/python_tools.spec +++ b/python_tools.spec @@ -4,6 +4,7 @@ Source: none Requires: root curl python python3 xrootd llvm hdf5 mxnet-predict yoda opencv +Requires: professor2 rivet frontier_client onnxruntime #needed for cmssw until python2-> python3 switch of framework Requires: py2-configparser @@ -218,7 +219,6 @@ Requires: py3-smmap Requires: py3-zipp Requires: py3-pycuda -Requires: onnxruntime Requires: py3-boost-histogram Requires: py3-hist diff --git a/rivet-toolfile.spec b/rivet-toolfile.spec index 09f34930d13..9ae7797fce3 100644 --- a/rivet-toolfile.spec +++ b/rivet-toolfile.spec @@ -38,8 +38,6 @@ cat << \EOF_TOOLFILE >>%i/etc/scram.d/rivet.xml EOF_TOOLFILE -export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) - ## IMPORT scram-tools-post diff --git a/rivet.spec b/rivet.spec index eb2dad954da..193fb6a050d 100644 --- a/rivet.spec +++ b/rivet.spec @@ -1,5 +1,4 @@ ### RPM external rivet 3.1.4 -## INITENV +PATH PYTHON27PATH %{i}/${PYTHON_LIB_SITE_PACKAGES} ## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} ## OLD GENSER Source: http://cern.ch/service-spi/external/MCGenerators/distribution/rivet/rivet-%{realversion}-src.tgz Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz diff --git a/root.spec b/root.spec index 50f14fe4cfa..05edab8a59a 100644 --- a/root.spec +++ b/root.spec @@ -1,5 +1,4 @@ ### RPM lcg root 6.22.08 -## INITENV +PATH PYTHON27PATH %{i}/lib ## INITENV +PATH PYTHON3PATH %{i}/lib ## INITENV SET ROOTSYS %{i} @@ -11,7 +10,7 @@ Source: git+https://github.com/%{github_user}/root.git?obj=%{branch}/%{tag}&expo BuildRequires: cmake ninja -Requires: gsl libjpeg-turbo libpng libtiff giflib pcre python python3 fftw3 xz xrootd libxml2 zlib davix tbb OpenBLAS py3-numpy lz4 freetype zstd +Requires: gsl libjpeg-turbo libpng libtiff giflib pcre python3 fftw3 xz xrootd libxml2 zlib davix tbb OpenBLAS py3-numpy lz4 freetype zstd %ifos linux Requires: dcap @@ -32,7 +31,6 @@ rm -rf ../build mkdir ../build cd ../build -export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) export CFLAGS=-D__ROOFIT_NOBANNER export CXXFLAGS=-D__ROOFIT_NOBANNER @@ -138,7 +136,7 @@ cmake ../%{n}-%{realversion} \ -DZLIB_ROOT="${ZLIB_ROOT}" \ -DZLIB_INCLUDE_DIR="${ZLIB_ROOT}/include" \ -DZSTD_ROOT="${ZSTD_ROOT}" \ - -DCMAKE_PREFIX_PATH="${LZ4_ROOT};${GSL_ROOT};${XZ_ROOT};${GIFLIB_ROOT};${FREETYPE_ROOT};${PYTHON_ROOT};${PYTHON3_ROOT};${LIBPNG_ROOT};${PCRE_ROOT};${TBB_ROOT};${OPENBLAS_ROOT};${DAVIX_ROOT};${LIBXML2_ROOT};${ZSTD_ROOT}" + -DCMAKE_PREFIX_PATH="${LZ4_ROOT};${GSL_ROOT};${XZ_ROOT};${GIFLIB_ROOT};${FREETYPE_ROOT};${PYTHON3_ROOT};${LIBPNG_ROOT};${PCRE_ROOT};${TBB_ROOT};${OPENBLAS_ROOT};${DAVIX_ROOT};${LIBXML2_ROOT};${ZSTD_ROOT}" # For CMake cache variables: http://www.cmake.org/cmake/help/v3.2/manual/cmake-language.7.html#lists # For environment variables it's OS specific: http://www.cmake.org/Wiki/CMake_Useful_Variables diff --git a/scram-project-build.file b/scram-project-build.file index 099f567cba7..e751509135d 100644 --- a/scram-project-build.file +++ b/scram-project-build.file @@ -53,7 +53,7 @@ BuildRequires: dwz %endif %if "%{?configtag:set}" != "set" -%define configtag V06-02-17 +%define configtag V06-02-21 %endif %if "%{?cvssrc:set}" != "set" diff --git a/sherpa-toolfile.spec b/sherpa-toolfile.spec index c8ca187c258..5c43ca6d9cc 100644 --- a/sherpa-toolfile.spec +++ b/sherpa-toolfile.spec @@ -40,6 +40,4 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/sherpa.xml EOF_TOOLFILE -export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) - ## IMPORT scram-tools-post diff --git a/xrootd.spec b/xrootd.spec index e693f705801..0ef24d0f013 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -1,6 +1,5 @@ ### RPM external xrootd 4.12.3 ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 -## INITENV +PATH PYTHON27PATH %{i}/${PYTHON_LIB_SITE_PACKAGES} ## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} %define tag b122d662f80a46a570876afd32cdaa9f4370dc1d