The package rpms/HepMC3.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/HepMC3.git/commit/?id=f875d5c8a8d5ba... https://src.fedoraproject.org/cgit/rpms/HepMC3.git/commit/?id=f86b965492e771....
Change: -%ifarch ppc64le +%ifarch ppc64le
Thanks.
Full change: ============
commit 7cebad26fa2cd2ccb0ba86cdf111198de361f27a Author: Mattias Ellert mattias.ellert@physics.uu.se Date: Wed Jun 10 23:08:41 2020 +0200
Update to version 3.2.2 Drop patches accepted upstream or previously backported Drop the memory reduction on ARM patch - no longer needed since the python module sources were split into multiple files Use new cmake configuration option -DHEPMC3_INSTALL_EXAMPLES and simplify spec file accordingly Bump soname for libHepMC3search.so (3 to 4)
diff --git a/HepMC3-arm-memory.patch b/HepMC3-arm-memory.patch deleted file mode 100644 index c06fef4..0000000 --- a/HepMC3-arm-memory.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ur HepMC3-3.2.1.orig/python/CMakeLists.txt HepMC3-3.2.1/python/CMakeLists.txt ---- HepMC3-3.2.1.orig/python/CMakeLists.txt 2020-03-17 11:38:25.000000000 +0100 -+++ HepMC3-3.2.1/python/CMakeLists.txt 2020-03-22 15:30:35.572891013 +0100 -@@ -199,6 +199,10 @@ - endif() - endif() - -+if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") -+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g1") -+endif() -+ - if ( Python_LIBRARIES AND Python_INCLUDE_DIRS AND Python_EXECUTABLE AND ((${Python_VERSION_MAJOR} STREQUAL ${ver} AND ${verminor} STREQUAL "X") OR "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}" STREQUAL "${ver}.${verminor}" )) - message(STATUS "HepMC3 python: Python verson ${ver}.${verminor} found in ${Python_EXECUTABLE}. Python bindings generation is possible.") - diff --git a/HepMC3-config.patch b/HepMC3-config.patch deleted file mode 100644 index dba83ed..0000000 --- a/HepMC3-config.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 4888b9d8a8f60f5a77b9ce102913ac74500af701 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert mattias.ellert@physics.uu.se -Date: Sun, 22 Mar 2020 22:44:11 +0100 -Subject: [PATCH] Use configure_package_config_file instead of configure_file - to generate HepMC3-config - it handles absolute paths properly. - -Use HEPMC3_ROOTIO_INSTALL_LIBDIR when generating HepMC3Config.cmake ---- - CMakeLists.txt | 29 +++++++++++++-------- - HepMC3-config.in | 36 ++++++++++++++------------- - cmake/Templates/HepMC3Config.cmake.in | 8 +++--- - 3 files changed, 41 insertions(+), 32 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a63b916..2c452b8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -217,34 +217,41 @@ endif() - install(TARGETS HepMC3_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs) - endif() - --configure_file(HepMC3-config.in ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}/HepMC3-config ) -- -- - install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel) - --install(FILES ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}/HepMC3-config DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -- - # Generate config CMake files to be used by other projects - # - - include(CMakePackageConfigHelpers) - --set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}) --set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) - set(INTERFACES_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/HepMC3/interfaces) - set(CONFIG_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/HepMC3/cmake) - --configure_package_config_file(cmake/Templates/HepMC3Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config.cmake -- INSTALL_DESTINATION ${CONFIG_INSTALL_DIR} -- PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR -- INTERFACES_INSTALL_DIR) -+configure_package_config_file(cmake/Templates/HepMC3Config.cmake.in -+ ${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config.cmake -+ INSTALL_DESTINATION ${CONFIG_INSTALL_DIR} -+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR -+ CMAKE_INSTALL_LIBDIR -+ HEPMC3_ROOTIO_INSTALL_LIBDIR -+ INTERFACES_INSTALL_DIR) - - write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config-version.cmake COMPATIBILITY SameMajorVersion) - -+configure_package_config_file(HepMC3-config.in -+ ${CMAKE_CURRENT_BINARY_DIR}/outputs/bin/HepMC3-config -+ INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR} -+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR -+ CMAKE_INSTALL_LIBDIR -+ HEPMC3_ROOTIO_INSTALL_LIBDIR) -+ - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config-version.cmake - DESTINATION ${CONFIG_INSTALL_DIR} COMPONENT devel) - -+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/outputs/bin/HepMC3-config -+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs -+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -+ - ######################################################################## - ## Optional packages - ######################################################################## -diff --git a/HepMC3-config.in b/HepMC3-config.in -index 7db10f6..46d5ab6 100755 ---- a/HepMC3-config.in -+++ b/HepMC3-config.in -@@ -5,13 +5,13 @@ - ## @configure_input@ - #The line below assures at least some relocation. - if [ "$(uname)" == "Darwin" ]; then --prefix=$(dirname $(dirname $(greadlink -f $0))) -+PACKAGE_PREFIX_DIR=$(dirname $(dirname $(greadlink -f $0))) - else --prefix=$(dirname $(dirname $(readlink -f $0))) -+PACKAGE_PREFIX_DIR=$(dirname $(dirname $(readlink -f $0))) - fi - tmp=$(echo $* | egrep -- '--<help>|-<h>') - if test $# -eq 0 || test -n "$tmp"; then -- echo "${PROJECT_NAME}-config: configuration tool for the ${PROJECT_NAME} library" -+ echo "@PROJECT_NAME@-config: configuration tool for the @PROJECT_NAME@ library" - echo - echo "Usage: $( basename $0 ) [--help|-h] | " - echo " [--{prefix,libdir,includedir}] | " -@@ -21,55 +21,57 @@ if test $# -eq 0 || test -n "$tmp"; then - echo " --help | -h : show this help message" - echo - echo " --prefix : show the installation prefix" -- echo " --includedir : show the path to the directory containing the ${PROJECT_NAME} headers" -- echo " --libdir : show the path to the directory containing the ${PROJECT_NAME} libraries" -+ echo " --includedir : show the path to the directory containing the @PROJECT_NAME@ headers" -+ echo " --libdir : show the path to the directory containing the @PROJECT_NAME@ libraries" - echo - echo " --cflags|--cppflags : returns a '-I' string for insertion into CPPFLAGS or CXXFLAGS" -- echo " --ldflags|libs : returns a '-L/-l' string for insertion into LIBS or LIBADD" -+ echo " --ldflags|--libs : returns a '-L/-l' string for insertion into LIBS or LIBADD" - echo " --rootIO : returns a '-L/-l' string for insertion into LIBS or LIBADD with rootIO support" - echo " --search : returns a '-L/-l' string for insertion into LIBS or LIBADD with search support" - echo " --static : returns a string for insertion into LIBS or LIBADD" - echo -- echo " --version : returns the ${PROJECT_NAME} release version number" -+ echo " --version : returns the @PROJECT_NAME@ release version number" - exit 0 - fi - - OUT="" - - tmp=$( echo "$*" | egrep -- '--<prefix>') --test -n "$tmp" && OUT="$OUT $prefix" -+test -n "$tmp" && OUT="$OUT ${PACKAGE_PREFIX_DIR}" - - tmp=$( echo "$*" | egrep -- '--<includedir>') --test -n "$tmp" && OUT="$OUT $prefix/${CMAKE_INSTALL_INCLUDEDIR}" -+test -n "$tmp" && OUT="$OUT @PACKAGE_CMAKE_INSTALL_INCLUDEDIR@" - - tmp=$( echo "$*" | egrep -- '--<libdir>') --test -n "$tmp" && OUT="$OUT $prefix/${CMAKE_INSTALL_LIBDIR}" -+test -n "$tmp" && OUT="$OUT @PACKAGE_CMAKE_INSTALL_LIBDIR@" - - tmp=$( echo "$*" | egrep -- '--<cflags|cppflags|cxxflags>') --test -n "$tmp" && OUT="$OUT -I$prefix/${CMAKE_INSTALL_INCLUDEDIR}" -+test -n "$tmp" && OUT="$OUT -I@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@" - - - tmp=$( echo "$*" | egrep -- '--<static>') - if test -n "$tmp"; then - - tmp=$( echo "$*" | egrep -- '--<ldflags|libs>') --OUT="$OUT $prefix/${CMAKE_INSTALL_LIBDIR}/libHepMC3_static.a -lHepMC3" -+OUT="$OUT @PACKAGE_CMAKE_INSTALL_LIBDIR@/libHepMC3_static.a" - - tmp=$( echo "$*" | egrep -- '--<search>') --test -n "$tmp" && OUT="$OUT -L$prefix/${CMAKE_INSTALL_LIBDIR}/libHepMC3search_static.a -lHepMC3search" -+test -n "$tmp" && OUT="$OUT @PACKAGE_CMAKE_INSTALL_LIBDIR@/libHepMC3search_static.a" - - else -+ - tmp=$( echo "$*" | egrep -- '--<ldflags|libs>') --test -n "$tmp" && OUT="$OUT -L$prefix/${CMAKE_INSTALL_LIBDIR} -lHepMC3" -+test -n "$tmp" && OUT="$OUT -L@PACKAGE_CMAKE_INSTALL_LIBDIR@ -lHepMC3" - - tmp=$( echo "$*" | egrep -- '--<search>') --test -n "$tmp" && OUT="$OUT -L$prefix/${CMAKE_INSTALL_LIBDIR} -lHepMC3search" -+test -n "$tmp" && OUT="$OUT -L@PACKAGE_CMAKE_INSTALL_LIBDIR@ -lHepMC3search" -+ - fi - - tmp=$( echo "$*" | egrep -- '--<rootIO>') --test -n "$tmp" && OUT="$OUT -L$prefix/${HEPMC3_ROOTIO_INSTALL_LIBDIR} ${HEPMC3_ROOTIO_LIBRARY}" -+test -n "$tmp" && OUT="$OUT -L@PACKAGE_HEPMC3_ROOTIO_INSTALL_LIBDIR@ @HEPMC3_ROOTIO_LIBRARY@" - - tmp=$( echo "$*" | egrep -- '--<version>') --test -n "$tmp" && echo ${PROJECT_VERSION}&& exit 0 -+test -n "$tmp" && echo @PROJECT_VERSION@ && exit 0 - - echo $OUT -diff --git a/cmake/Templates/HepMC3Config.cmake.in b/cmake/Templates/HepMC3Config.cmake.in -index 9f690fe..df8f440 100644 ---- a/cmake/Templates/HepMC3Config.cmake.in -+++ b/cmake/Templates/HepMC3Config.cmake.in -@@ -6,15 +6,15 @@ SET(HEPMC3_VERSION_MINOR @HEPMC3_VERSION_MINOR@) - SET(HEPMC3_VERSION_PATCH @HEPMC3_VERSION_PATCH@) - - --set_and_check(HEPMC3_INCLUDE_DIR @PACKAGE_INCLUDE_INSTALL_DIR@) -+set_and_check(HEPMC3_INCLUDE_DIR @PACKAGE_CMAKE_INSTALL_INCLUDEDIR@) - - if(EXISTS @PACKAGE_INTERFACES_INSTALL_DIR@) - set(HEPMC3_INTERFACES_DIR @PACKAGE_INTERFACES_INSTALL_DIR@) - endif() - --find_library(HEPMC3_LIB NAMES HepMC3 HINTS @PACKAGE_LIB_INSTALL_DIR@) --find_library(HEPMC3_SEARCH_LIB NAMES HepMC3search HINTS @PACKAGE_LIB_INSTALL_DIR@) --find_library(HEPMC3_ROOTIO_LIB NAMES HepMC3rootIO HINTS @PACKAGE_LIB_INSTALL_DIR@ @PACKAGE_LIB_INSTALL_DIR@/root) -+find_library(HEPMC3_LIB NAMES HepMC3 HINTS @PACKAGE_CMAKE_INSTALL_LIBDIR@) -+find_library(HEPMC3_SEARCH_LIB NAMES HepMC3search HINTS @PACKAGE_CMAKE_INSTALL_LIBDIR@) -+find_library(HEPMC3_ROOTIO_LIB NAMES HepMC3rootIO HINTS @PACKAGE_HEPMC3_ROOTIO_INSTALL_LIBDIR@) - - set(HEPMC3_LIBRARIES ${HEPMC3_LIB}) - if(EXISTS ${HEPMC3_SEARCH_LIB}) --- -2.25.1 - diff --git a/HepMC3-initialize-root.patch b/HepMC3-initialize-root.patch deleted file mode 100644 index 841c125..0000000 --- a/HepMC3-initialize-root.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/python/src/rootIO/__init__.py b/python/src/rootIO/__init__.py -index 709d8bd..461aa10 100644 ---- a/python/src/rootIO/__init__.py -+++ b/python/src/rootIO/__init__.py -@@ -1 +1,5 @@ -+# Preload libCore to initialize ROOT -+from ctypes import cdll -+libCore = cdll.LoadLibrary("libCore.so") -+ - from .pyHepMC3rootIO import * diff --git a/HepMC3-python-tests.patch b/HepMC3-python-tests.patch deleted file mode 100644 index b8f00f1..0000000 --- a/HepMC3-python-tests.patch +++ /dev/null @@ -1,203 +0,0 @@ -From ee942bb35bb1735e0a91e61564e7eaf50a78a519 Mon Sep 17 00:00:00 2001 -From: Andrii Verbytskyi andriish@hermes.mpp.mpg.de -Date: Thu, 26 Mar 2020 10:50:36 +0100 -Subject: [PATCH] Attempt to fix the python tests - ---- - python/test/pyHepMC3TestUtils.py | 5 +++++ - python/test/test_IO1.py | 10 +++++----- - python/test/test_IO2.py | 10 +++++----- - python/test/test_Polarization.py | 12 ++++++------ - python/test/test_Print.py | 8 ++++---- - python/test/test_Pythia8.py | 4 ++-- - 6 files changed, 27 insertions(+), 22 deletions(-) - -diff --git a/python/test/pyHepMC3TestUtils.py b/python/test/pyHepMC3TestUtils.py -index 3ea8061..fe0d246 100644 ---- a/python/test/pyHepMC3TestUtils.py -+++ b/python/test/pyHepMC3TestUtils.py -@@ -4,7 +4,12 @@ import sys,os - def update_path(): - v=sys.version_info - return [os.path.abspath(os.path.join(os.pardir,str(v[0])+"."+str(v[1])+"."+str(v[2])))]+[os.getcwd()]+sys.path -+ -+def python_label(): -+ v=sys.version_info -+ return str(v[0])+"."+str(v[1])+"."+str(v[2]) - -+ - def COMPARE_ASCII_FILES(f1,f2): - file1=open(f1) - file2=open(f2) -diff --git a/python/test/test_IO1.py b/python/test/test_IO1.py -index e80a5af..aba6762 100644 ---- a/python/test/test_IO1.py -+++ b/python/test/test_IO1.py -@@ -1,4 +1,4 @@ --from pyHepMC3TestUtils import update_path -+from pyHepMC3TestUtils import update_path,python_label - import sys,os - sys.path=update_path() - -@@ -8,7 +8,7 @@ from pyHepMC3 import HepMC3 as hm - def test_IO1(): - inputA=hm.ReaderAsciiHepMC2("inputIO1.hepmc") - if inputA.failed(): sys.exit(1) -- outputA=hm.WriterAscii ("frominputIO1.hepmc") -+ outputA=hm.WriterAscii (python_label()+"frominputIO1.hepmc") - if outputA.failed(): sys.exit(2) - while not inputA.failed(): - evt=hm.GenEvent() -@@ -21,9 +21,9 @@ def test_IO1(): - inputA.close() - outputA.close() - -- inputB=hm.ReaderAscii ("frominputIO1.hepmc") -+ inputB=hm.ReaderAscii (python_label()+"frominputIO1.hepmc") - if inputB.failed(): sys.exit(3) -- outputB=hm.WriterAsciiHepMC2("fromfrominputIO1.hepmc") -+ outputB=hm.WriterAsciiHepMC2(python_label()+"fromfrominputIO1.hepmc") - if outputB.failed(): sys.exit(4) - while not inputB.failed(): - evt=hm.GenEvent() -@@ -35,7 +35,7 @@ def test_IO1(): - evt.clear() - inputB.close() - outputB.close() -- assert(0 == COMPARE_ASCII_FILES("fromfrominputIO1.hepmc","inputIO1.hepmc")) -+ assert(0 == COMPARE_ASCII_FILES(python_label()+"fromfrominputIO1.hepmc","inputIO1.hepmc")) - return 0 - if __name__ == "__main__": - result=1 -diff --git a/python/test/test_IO2.py b/python/test/test_IO2.py -index 938830f..b838fa6 100644 ---- a/python/test/test_IO2.py -+++ b/python/test/test_IO2.py -@@ -1,4 +1,4 @@ --from pyHepMC3TestUtils import update_path -+from pyHepMC3TestUtils import update_path,python_label - import sys,os - sys.path=update_path() - -@@ -10,7 +10,7 @@ print(dir(hmrootIO)) - def test_IO2(): - inputA=hm.ReaderAsciiHepMC2("inputIO2.hepmc") - if inputA.failed(): sys.exit(1) -- outputA=hmrootIO.WriterRootTree ("frominputIO2.root") -+ outputA=hmrootIO.WriterRootTree (python_label()+"frominputIO2.root") - if outputA.failed(): sys.exit(2) - while not inputA.failed(): - evt=hm.GenEvent() -@@ -23,9 +23,9 @@ def test_IO2(): - inputA.close() - outputA.close() - -- inputB=hmrootIO.ReaderRootTree ("frominputIO2.root") -+ inputB=hmrootIO.ReaderRootTree (python_label()+"frominputIO2.root") - if inputB.failed(): sys.exit(3) -- outputB=hm.WriterAsciiHepMC2("fromfrominputIO2.hepmc") -+ outputB=hm.WriterAsciiHepMC2(python_label()+"fromfrominputIO2.hepmc") - if outputB.failed(): sys.exit(4) - while not inputB.failed(): - evt=hm.GenEvent() -@@ -37,7 +37,7 @@ def test_IO2(): - evt.clear() - inputB.close() - outputB.close() -- assert(0 == COMPARE_ASCII_FILES("fromfrominputIO2.hepmc","inputIO2.hepmc")) -+ assert(0 == COMPARE_ASCII_FILES(python_label()+"fromfrominputIO2.hepmc","inputIO2.hepmc")) - return 0 - if __name__ == "__main__": - result=1 -diff --git a/python/test/test_Polarization.py b/python/test/test_Polarization.py -index b7d4ad1..b80a02d 100644 ---- a/python/test/test_Polarization.py -+++ b/python/test/test_Polarization.py -@@ -15,7 +15,7 @@ - # 7 !d! 1 1 5,5 -2.445 28.816 6.082 29.552 0.010 - # 8 !u~! 1 -2 5,5 3.962 -49.498 -26.687 56.373 0.006 - --from pyHepMC3TestUtils import update_path -+from pyHepMC3TestUtils import update_path,python_label - import sys,os - sys.path=update_path() - -@@ -24,10 +24,10 @@ from pyHepMC3TestUtils import COMPARE_ASCII_FILES - from pyHepMC3 import HepMC3 as hm - - def test_Polarization(): -- xout1=hm.WriterAscii ("testPolarization1.dat") -- xout2=hm.WriterAscii("testPolarization2.dat") -- xout4=hm.WriterAsciiHepMC2( "testPolarization4.out" ) -- xout5=hm.WriterAscii( "testPolarization5.out" ) -+ xout1=hm.WriterAscii (python_label()+"testPolarization1.dat") -+ xout2=hm.WriterAscii(python_label()+"testPolarization2.dat") -+ xout4=hm.WriterAsciiHepMC2( python_label()+"testPolarization4.out" ) -+ xout5=hm.WriterAscii( python_label()+"testPolarization5.out" ) - - # build the graph, which will look like - # p7 # -@@ -138,7 +138,7 @@ def test_Polarization(): - # contained in those vertices - evt.clear() - -- assert((COMPARE_ASCII_FILES("testPolarization1.dat","testPolarization5.out")==0) and (COMPARE_ASCII_FILES("testPolarization1.dat","testPolarization2.dat")!=0)) -+ assert((COMPARE_ASCII_FILES(python_label()+"testPolarization1.dat",python_label()+"testPolarization5.out")==0) and (COMPARE_ASCII_FILES(python_label()+"testPolarization1.dat",python_label()+"testPolarization2.dat")!=0)) - return 0 - if __name__ == "__main__": - result=1 -diff --git a/python/test/test_Print.py b/python/test/test_Print.py -index 64a5c08..833ef36 100644 ---- a/python/test/test_Print.py -+++ b/python/test/test_Print.py -@@ -1,4 +1,4 @@ --from pyHepMC3TestUtils import update_path -+from pyHepMC3TestUtils import update_path,python_label - import sys,os - sys.path=update_path() - -@@ -83,7 +83,7 @@ def test_Print(): - for ip in evt.particles(): - print ( hm.Print.line(ip,True)) - -- xout1=hm.WriterAscii("testBoost1.out") -+ xout1=hm.WriterAscii(python_label()+"testBoost1.out") - xout1.set_precision(6) - xout1.write_event(evt) - xout1.close() -@@ -96,11 +96,11 @@ def test_Print(): - print ( hm.Print.line(ip,True)) - for ip in evt.particles(): - print ( hm.Print.line(ip,True)) -- xout2=hm.WriterAscii("testBoost2.out") -+ xout2=hm.WriterAscii(python_label()+"testBoost2.out") - xout2.set_precision(6) - xout2.write_event(evt) - xout2.close() -- assert (COMPARE_ASCII_FILES("testBoost1.out","testBoost2.out")==0) -+ assert (COMPARE_ASCII_FILES(python_label()+"testBoost1.out",python_label()+"testBoost2.out")==0) - evt.clear() - return 0 - if __name__ == "__main__": -diff --git a/python/test/test_Pythia8.py b/python/test/test_Pythia8.py -index 541358a..b693ea5 100644 ---- a/python/test/test_Pythia8.py -+++ b/python/test/test_Pythia8.py -@@ -1,4 +1,4 @@ --from pyHepMC3TestUtils import update_path -+from pyHepMC3TestUtils import update_path,python_label - import sys,os - sys.path=update_path() - -@@ -17,7 +17,7 @@ def test_Pythia8(): - pythia.init() - p8tohm=Pythia8ToHepMC3 () - p8tohm.m_store_pdf=True -- out=hm.WriterAscii("test_Pythia.hepmc") -+ out=hm.WriterAscii(python_label()+"test_Pythia.hepmc") - for iEvent in range(0, 100): - if not pythia.next(): continue - nCharged = 0 --- -2.25.1 - diff --git a/HepMC3.spec b/HepMC3.spec index f521fd2..8ba9d9d 100644 --- a/HepMC3.spec +++ b/HepMC3.spec @@ -1,23 +1,11 @@ Name: HepMC3 -Version: 3.2.1 -Release: 3%{?dist} +Version: 3.2.2 +Release: 1%{?dist} Summary: C++ Event Record for Monte Carlo Generators
License: GPLv3+ URL: https://hepmc.web.cern.ch/hepmc/ Source0: https://hepmc.web.cern.ch/hepmc/releases/%%7Bname%7D-%%7Bversion%7D.tar.gz -# Improvements to HepMC3-config and HepMC3Config.cmake -# https://gitlab.cern.ch/hepmc/HepMC3/merge_requests/55 -Patch0: %{name}-config.patch -# Reduce memory usage when building Python bindings on ARM -Patch1: %{name}-arm-memory.patch -# The same test for different python versions must not -# overwrite eachother's files -# https://gitlab.cern.ch/hepmc/HepMC3/merge_requests/57 -Patch2: %{name}-python-tests.patch -# Initialize ROOT in rootIO python bindings -# Avoids a problem on EPEL 7 ppc64le -Patch3: %{name}-initialize-root.patch
# The ROOT cmake file used by this project requires cmake 3.9 %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 @@ -34,14 +22,16 @@ BuildRequires: root-tree %endif BuildRequires: doxygen BuildRequires: graphviz -# Additional requirements for tests -BuildRequires: pythia8-devel -BuildRequires: valgrind %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: python2-devel BuildRequires: python%{python3_other_pkgversion}-devel %endif BuildRequires: python%{python3_pkgversion}-devel +# Additional requirements for tests +BuildRequires: pythia8-devel +BuildRequires: valgrind +# For HepMC2 - HepMC3 conversion tests +BuildRequires: HepMC-devel
%description The HepMC3 package is an object oriented, C++ event record for @@ -194,10 +184,6 @@ This package provides HepMC manuals and examples.
%prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1
%build %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 @@ -213,6 +199,7 @@ This package provides HepMC manuals and examples. %endif -DHEPMC3_ENABLE_TEST:BOOL=ON \ -DHEPMC3_INSTALL_INTERFACES:BOOL=ON \ + -DHEPMC3_INSTALL_EXAMPLES:BOOL=ON \ %if %{?rhel}%{!?rhel:0} == 7 -DHEPMC3_PYTHON_VERSIONS=2,%python3_version,%python3_other_version \ %else @@ -226,7 +213,6 @@ make %{?_smp_mflags}
%install make install DESTDIR=%{buildroot} -cp -pr examples %{buildroot}%{_pkgdocdir}
%check %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 @@ -297,7 +283,7 @@ ctest3 %{?_smp_mflags} --output-on-failure %{_datadir}/%{name}/cmake/HepMC3Config-version.cmake
%files search -%{_libdir}/libHepMC3search.so.3 +%{_libdir}/libHepMC3search.so.4
%files search-devel %{_libdir}/libHepMC3search.so @@ -401,6 +387,15 @@ ctest3 %{?_smp_mflags} --output-on-failure %license COPYING
%changelog +* Wed Jun 10 2020 Mattias Ellert mattias.ellert@physics.uu.se - 3.2.2-1 +- Update to version 3.2.2 +- Drop patches accepted upstream or previously backported +- Drop the memory reduction on ARM patch - no longer needed since the + python module sources were split into multiple files +- Use new cmake configuration option -DHEPMC3_INSTALL_EXAMPLES and + simplify spec file accordingly +- Bump soname for libHepMC3search.so (3 to 4) + * Tue May 26 2020 Miro Hrončok mhroncok@redhat.com - 3.2.1-3 - Rebuilt for Python 3.9
diff --git a/sources b/sources index 0eefc10..7405297 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (HepMC3-3.2.1.tar.gz) = b44fa8c61426acce52ec2013cf30c34ab268a2ef02f1c65760223ef59b893b3691029de6f3d61ada0a0c4498ff7f69243f58bbfff27b8d8fc4ff952e455e0150 +SHA512 (HepMC3-3.2.2.tar.gz) = 9d31e8c9b7cdbfa1baafc719c91bec2587bc503167d41ee06beaabab604be4785798c3adfb7d2b88891a7469aeda2375dde9ce060b37bc1cf9b6286c43a499dc
commit 3f1a40a83f282b34100d8e82923dd062a778ae79 Author: Miro Hrončok miro@hroncok.cz Date: Tue May 26 02:39:09 2020 +0200
Rebuilt for Python 3.9
diff --git a/HepMC3.spec b/HepMC3.spec index 68b3ffd..f521fd2 100644 --- a/HepMC3.spec +++ b/HepMC3.spec @@ -1,6 +1,6 @@ Name: HepMC3 Version: 3.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ Event Record for Monte Carlo Generators
License: GPLv3+ @@ -401,6 +401,9 @@ ctest3 %{?_smp_mflags} --output-on-failure %license COPYING
%changelog +* Tue May 26 2020 Miro Hrončok mhroncok@redhat.com - 3.2.1-3 +- Rebuilt for Python 3.9 + * Sun Mar 29 2020 Mattias Ellert mattias.ellert@physics.uu.se - 3.2.1-2 - Initialize ROOT in rootIO python bindings - avoids problem on EPEL 7 ppc64le - Use upstream's fix for parallel python tests
commit f875d5c8a8d5ba9d304444b0e3c893530b3c4a84 Author: Mattias Ellert mattias.ellert@physics.uu.se Date: Sun Mar 29 09:29:03 2020 +0200
Initialize ROOT in rootIO python bindings - avoids problem on EPEL 7 ppc64le Use upstream's fix for parallel python tests
diff --git a/HepMC3-initialize-root.patch b/HepMC3-initialize-root.patch new file mode 100644 index 0000000..841c125 --- /dev/null +++ b/HepMC3-initialize-root.patch @@ -0,0 +1,10 @@ +diff --git a/python/src/rootIO/__init__.py b/python/src/rootIO/__init__.py +index 709d8bd..461aa10 100644 +--- a/python/src/rootIO/__init__.py ++++ b/python/src/rootIO/__init__.py +@@ -1 +1,5 @@ ++# Preload libCore to initialize ROOT ++from ctypes import cdll ++libCore = cdll.LoadLibrary("libCore.so") ++ + from .pyHepMC3rootIO import * diff --git a/HepMC3-python-tests.patch b/HepMC3-python-tests.patch index b9ad0e2..b8f00f1 100644 --- a/HepMC3-python-tests.patch +++ b/HepMC3-python-tests.patch @@ -1,38 +1,203 @@ -From da9c200e22c63e28159d37cd30846e1097b07f43 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert mattias.ellert@physics.uu.se -Date: Thu, 26 Mar 2020 10:09:18 +0100 -Subject: [PATCH] The same test for different python versions must not - overwrite eachother's files +From ee942bb35bb1735e0a91e61564e7eaf50a78a519 Mon Sep 17 00:00:00 2001 +From: Andrii Verbytskyi andriish@hermes.mpp.mpg.de +Date: Thu, 26 Mar 2020 10:50:36 +0100 +Subject: [PATCH] Attempt to fix the python tests
--- - python/CMakeLists.txt | 7 +++++++ - 1 file changed, 7 insertions(+) + python/test/pyHepMC3TestUtils.py | 5 +++++ + python/test/test_IO1.py | 10 +++++----- + python/test/test_IO2.py | 10 +++++----- + python/test/test_Polarization.py | 12 ++++++------ + python/test/test_Print.py | 8 ++++---- + python/test/test_Pythia8.py | 4 ++-- + 6 files changed, 27 insertions(+), 22 deletions(-)
-diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt -index 95d1b1f..a538aac 100644 ---- a/python/CMakeLists.txt -+++ b/python/CMakeLists.txt -@@ -137,6 +137,8 @@ endif() - endif() - - macro(bindings ver verminor) -+SET(Last_Python_VERSION ${Python_VERSION}) +diff --git a/python/test/pyHepMC3TestUtils.py b/python/test/pyHepMC3TestUtils.py +index 3ea8061..fe0d246 100644 +--- a/python/test/pyHepMC3TestUtils.py ++++ b/python/test/pyHepMC3TestUtils.py +@@ -4,7 +4,12 @@ import sys,os + def update_path(): + v=sys.version_info + return [os.path.abspath(os.path.join(os.pardir,str(v[0])+"."+str(v[1])+"."+str(v[2])))]+[os.getcwd()]+sys.path + - SET( Python_VERSION_MAJOR "0") - SET( Python_VERSION_MINOR "0") - -@@ -374,6 +376,11 @@ ENABLE_TESTING() - endif() - foreach ( ptest ${HepMC_python_tests} ) - add_test(NAME python${Python_VERSION}_${ptest} COMMAND ${Python_EXECUTABLE} ${ptest}.py WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") -+ # The same test for different python versions must not overwrite -+ # eachother's files -+ if(NOT ${Last_Python_VERSION} STREQUAL "") -+ set_tests_properties(python${Python_VERSION}_${ptest} PROPERTIES DEPENDS python${Last_Python_VERSION}_${ptest}) -+ endif() - endforeach ( ptest ${HepMC_python_tests} ) - endif() ++def python_label(): ++ v=sys.version_info ++ return str(v[0])+"."+str(v[1])+"."+str(v[2]) + ++ + def COMPARE_ASCII_FILES(f1,f2): + file1=open(f1) + file2=open(f2) +diff --git a/python/test/test_IO1.py b/python/test/test_IO1.py +index e80a5af..aba6762 100644 +--- a/python/test/test_IO1.py ++++ b/python/test/test_IO1.py +@@ -1,4 +1,4 @@ +-from pyHepMC3TestUtils import update_path ++from pyHepMC3TestUtils import update_path,python_label + import sys,os + sys.path=update_path() + +@@ -8,7 +8,7 @@ from pyHepMC3 import HepMC3 as hm + def test_IO1(): + inputA=hm.ReaderAsciiHepMC2("inputIO1.hepmc") + if inputA.failed(): sys.exit(1) +- outputA=hm.WriterAscii ("frominputIO1.hepmc") ++ outputA=hm.WriterAscii (python_label()+"frominputIO1.hepmc") + if outputA.failed(): sys.exit(2) + while not inputA.failed(): + evt=hm.GenEvent() +@@ -21,9 +21,9 @@ def test_IO1(): + inputA.close() + outputA.close() + +- inputB=hm.ReaderAscii ("frominputIO1.hepmc") ++ inputB=hm.ReaderAscii (python_label()+"frominputIO1.hepmc") + if inputB.failed(): sys.exit(3) +- outputB=hm.WriterAsciiHepMC2("fromfrominputIO1.hepmc") ++ outputB=hm.WriterAsciiHepMC2(python_label()+"fromfrominputIO1.hepmc") + if outputB.failed(): sys.exit(4) + while not inputB.failed(): + evt=hm.GenEvent() +@@ -35,7 +35,7 @@ def test_IO1(): + evt.clear() + inputB.close() + outputB.close() +- assert(0 == COMPARE_ASCII_FILES("fromfrominputIO1.hepmc","inputIO1.hepmc")) ++ assert(0 == COMPARE_ASCII_FILES(python_label()+"fromfrominputIO1.hepmc","inputIO1.hepmc")) + return 0 + if __name__ == "__main__": + result=1 +diff --git a/python/test/test_IO2.py b/python/test/test_IO2.py +index 938830f..b838fa6 100644 +--- a/python/test/test_IO2.py ++++ b/python/test/test_IO2.py +@@ -1,4 +1,4 @@ +-from pyHepMC3TestUtils import update_path ++from pyHepMC3TestUtils import update_path,python_label + import sys,os + sys.path=update_path() + +@@ -10,7 +10,7 @@ print(dir(hmrootIO)) + def test_IO2(): + inputA=hm.ReaderAsciiHepMC2("inputIO2.hepmc") + if inputA.failed(): sys.exit(1) +- outputA=hmrootIO.WriterRootTree ("frominputIO2.root") ++ outputA=hmrootIO.WriterRootTree (python_label()+"frominputIO2.root") + if outputA.failed(): sys.exit(2) + while not inputA.failed(): + evt=hm.GenEvent() +@@ -23,9 +23,9 @@ def test_IO2(): + inputA.close() + outputA.close() + +- inputB=hmrootIO.ReaderRootTree ("frominputIO2.root") ++ inputB=hmrootIO.ReaderRootTree (python_label()+"frominputIO2.root") + if inputB.failed(): sys.exit(3) +- outputB=hm.WriterAsciiHepMC2("fromfrominputIO2.hepmc") ++ outputB=hm.WriterAsciiHepMC2(python_label()+"fromfrominputIO2.hepmc") + if outputB.failed(): sys.exit(4) + while not inputB.failed(): + evt=hm.GenEvent() +@@ -37,7 +37,7 @@ def test_IO2(): + evt.clear() + inputB.close() + outputB.close() +- assert(0 == COMPARE_ASCII_FILES("fromfrominputIO2.hepmc","inputIO2.hepmc")) ++ assert(0 == COMPARE_ASCII_FILES(python_label()+"fromfrominputIO2.hepmc","inputIO2.hepmc")) + return 0 + if __name__ == "__main__": + result=1 +diff --git a/python/test/test_Polarization.py b/python/test/test_Polarization.py +index b7d4ad1..b80a02d 100644 +--- a/python/test/test_Polarization.py ++++ b/python/test/test_Polarization.py +@@ -15,7 +15,7 @@ + # 7 !d! 1 1 5,5 -2.445 28.816 6.082 29.552 0.010 + # 8 !u~! 1 -2 5,5 3.962 -49.498 -26.687 56.373 0.006 + +-from pyHepMC3TestUtils import update_path ++from pyHepMC3TestUtils import update_path,python_label + import sys,os + sys.path=update_path() + +@@ -24,10 +24,10 @@ from pyHepMC3TestUtils import COMPARE_ASCII_FILES + from pyHepMC3 import HepMC3 as hm + + def test_Polarization(): +- xout1=hm.WriterAscii ("testPolarization1.dat") +- xout2=hm.WriterAscii("testPolarization2.dat") +- xout4=hm.WriterAsciiHepMC2( "testPolarization4.out" ) +- xout5=hm.WriterAscii( "testPolarization5.out" ) ++ xout1=hm.WriterAscii (python_label()+"testPolarization1.dat") ++ xout2=hm.WriterAscii(python_label()+"testPolarization2.dat") ++ xout4=hm.WriterAsciiHepMC2( python_label()+"testPolarization4.out" ) ++ xout5=hm.WriterAscii( python_label()+"testPolarization5.out" ) + + # build the graph, which will look like + # p7 # +@@ -138,7 +138,7 @@ def test_Polarization(): + # contained in those vertices + evt.clear() + +- assert((COMPARE_ASCII_FILES("testPolarization1.dat","testPolarization5.out")==0) and (COMPARE_ASCII_FILES("testPolarization1.dat","testPolarization2.dat")!=0)) ++ assert((COMPARE_ASCII_FILES(python_label()+"testPolarization1.dat",python_label()+"testPolarization5.out")==0) and (COMPARE_ASCII_FILES(python_label()+"testPolarization1.dat",python_label()+"testPolarization2.dat")!=0)) + return 0 + if __name__ == "__main__": + result=1 +diff --git a/python/test/test_Print.py b/python/test/test_Print.py +index 64a5c08..833ef36 100644 +--- a/python/test/test_Print.py ++++ b/python/test/test_Print.py +@@ -1,4 +1,4 @@ +-from pyHepMC3TestUtils import update_path ++from pyHepMC3TestUtils import update_path,python_label + import sys,os + sys.path=update_path() + +@@ -83,7 +83,7 @@ def test_Print(): + for ip in evt.particles(): + print ( hm.Print.line(ip,True)) + +- xout1=hm.WriterAscii("testBoost1.out") ++ xout1=hm.WriterAscii(python_label()+"testBoost1.out") + xout1.set_precision(6) + xout1.write_event(evt) + xout1.close() +@@ -96,11 +96,11 @@ def test_Print(): + print ( hm.Print.line(ip,True)) + for ip in evt.particles(): + print ( hm.Print.line(ip,True)) +- xout2=hm.WriterAscii("testBoost2.out") ++ xout2=hm.WriterAscii(python_label()+"testBoost2.out") + xout2.set_precision(6) + xout2.write_event(evt) + xout2.close() +- assert (COMPARE_ASCII_FILES("testBoost1.out","testBoost2.out")==0) ++ assert (COMPARE_ASCII_FILES(python_label()+"testBoost1.out",python_label()+"testBoost2.out")==0) + evt.clear() + return 0 + if __name__ == "__main__": +diff --git a/python/test/test_Pythia8.py b/python/test/test_Pythia8.py +index 541358a..b693ea5 100644 +--- a/python/test/test_Pythia8.py ++++ b/python/test/test_Pythia8.py +@@ -1,4 +1,4 @@ +-from pyHepMC3TestUtils import update_path ++from pyHepMC3TestUtils import update_path,python_label + import sys,os + sys.path=update_path()
+@@ -17,7 +17,7 @@ def test_Pythia8(): + pythia.init() + p8tohm=Pythia8ToHepMC3 () + p8tohm.m_store_pdf=True +- out=hm.WriterAscii("test_Pythia.hepmc") ++ out=hm.WriterAscii(python_label()+"test_Pythia.hepmc") + for iEvent in range(0, 100): + if not pythia.next(): continue + nCharged = 0 -- 2.25.1
diff --git a/HepMC3-root-bug-workaround.patch b/HepMC3-root-bug-workaround.patch deleted file mode 100644 index 9108af9..0000000 --- a/HepMC3-root-bug-workaround.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur HepMC3-3.2.1.orig/python/test/test_IO2.py HepMC3-3.2.1/python/test/test_IO2.py ---- HepMC3-3.2.1.orig/python/test/test_IO2.py 2020-03-17 11:38:25.000000000 +0100 -+++ HepMC3-3.2.1/python/test/test_IO2.py 2020-03-25 13:06:33.448541775 +0100 -@@ -2,6 +2,7 @@ - import sys,os - sys.path=update_path() - -+import ROOT - - from pyHepMC3TestUtils import COMPARE_ASCII_FILES - from pyHepMC3 import HepMC3 as hm diff --git a/HepMC3.spec b/HepMC3.spec index 1009c1f..68b3ffd 100644 --- a/HepMC3.spec +++ b/HepMC3.spec @@ -1,6 +1,6 @@ Name: HepMC3 Version: 3.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ Event Record for Monte Carlo Generators
License: GPLv3+ @@ -13,11 +13,11 @@ Patch0: %{name}-config.patch Patch1: %{name}-arm-memory.patch # The same test for different python versions must not # overwrite eachother's files -# https://gitlab.cern.ch/hepmc/HepMC3/merge_requests/56 +# https://gitlab.cern.ch/hepmc/HepMC3/merge_requests/57 Patch2: %{name}-python-tests.patch -# Workaround for root problem on EPEL 7 ppc64le -# https://sft.its.cern.ch/jira/browse/ROOT-10622 -Patch3: %{name}-root-bug-workaround.patch +# Initialize ROOT in rootIO python bindings +# Avoids a problem on EPEL 7 ppc64le +Patch3: %{name}-initialize-root.patch
# The ROOT cmake file used by this project requires cmake 3.9 %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 @@ -43,15 +43,6 @@ BuildRequires: python%{python3_other_pkgversion}-devel %endif BuildRequires: python%{python3_pkgversion}-devel
-%if %{?rhel}%{!?rhel:0} == 7 -%ifarch ppc64le -# Workaround for root problem on EPEL 7 ppc64le -BuildRequires: python2-root -BuildRequires: python%{python3_other_pkgversion}-root -BuildRequires: python%{python3_pkgversion}-root -%endif -%endif - %description The HepMC3 package is an object oriented, C++ event record for High Energy Physics Monte Carlo generators and simulation. @@ -206,12 +197,7 @@ This package provides HepMC manuals and examples. %patch0 -p1 %patch1 -p1 %patch2 -p1 -%if %{?rhel}%{!?rhel:0} == 7 -%ifarch ppc64le -# Workaround for root problem on EPEL 7 ppc64le %patch3 -p1 -%endif -%endif
%build %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 @@ -415,6 +401,10 @@ ctest3 %{?_smp_mflags} --output-on-failure %license COPYING
%changelog +* Sun Mar 29 2020 Mattias Ellert mattias.ellert@physics.uu.se - 3.2.1-2 +- Initialize ROOT in rootIO python bindings - avoids problem on EPEL 7 ppc64le +- Use upstream's fix for parallel python tests + * Sun Mar 22 2020 Mattias Ellert mattias.ellert@physics.uu.se - 3.2.1-1 - Update to version 3.2.1 - Drop patches accepted upstream or previously backported
commit f86b965492e771967e7fdb822194c512093680ec Author: Mattias Ellert mattias.ellert@physics.uu.se Date: Thu Mar 26 10:29:49 2020 +0100
The same test for different python versions must not overwrite eachother's files Workaround for root problem on EPEL 7 ppc64le
diff --git a/HepMC3-python-tests.patch b/HepMC3-python-tests.patch new file mode 100644 index 0000000..b9ad0e2 --- /dev/null +++ b/HepMC3-python-tests.patch @@ -0,0 +1,38 @@ +From da9c200e22c63e28159d37cd30846e1097b07f43 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert mattias.ellert@physics.uu.se +Date: Thu, 26 Mar 2020 10:09:18 +0100 +Subject: [PATCH] The same test for different python versions must not + overwrite eachother's files + +--- + python/CMakeLists.txt | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt +index 95d1b1f..a538aac 100644 +--- a/python/CMakeLists.txt ++++ b/python/CMakeLists.txt +@@ -137,6 +137,8 @@ endif() + endif() + + macro(bindings ver verminor) ++SET(Last_Python_VERSION ${Python_VERSION}) ++ + SET( Python_VERSION_MAJOR "0") + SET( Python_VERSION_MINOR "0") + +@@ -374,6 +376,11 @@ ENABLE_TESTING() + endif() + foreach ( ptest ${HepMC_python_tests} ) + add_test(NAME python${Python_VERSION}_${ptest} COMMAND ${Python_EXECUTABLE} ${ptest}.py WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") ++ # The same test for different python versions must not overwrite ++ # eachother's files ++ if(NOT ${Last_Python_VERSION} STREQUAL "") ++ set_tests_properties(python${Python_VERSION}_${ptest} PROPERTIES DEPENDS python${Last_Python_VERSION}_${ptest}) ++ endif() + endforeach ( ptest ${HepMC_python_tests} ) + endif() + +-- +2.25.1 + diff --git a/HepMC3-root-bug-workaround.patch b/HepMC3-root-bug-workaround.patch new file mode 100644 index 0000000..9108af9 --- /dev/null +++ b/HepMC3-root-bug-workaround.patch @@ -0,0 +1,11 @@ +diff -ur HepMC3-3.2.1.orig/python/test/test_IO2.py HepMC3-3.2.1/python/test/test_IO2.py +--- HepMC3-3.2.1.orig/python/test/test_IO2.py 2020-03-17 11:38:25.000000000 +0100 ++++ HepMC3-3.2.1/python/test/test_IO2.py 2020-03-25 13:06:33.448541775 +0100 +@@ -2,6 +2,7 @@ + import sys,os + sys.path=update_path() + ++import ROOT + + from pyHepMC3TestUtils import COMPARE_ASCII_FILES + from pyHepMC3 import HepMC3 as hm diff --git a/HepMC3.spec b/HepMC3.spec index ab032a3..1009c1f 100644 --- a/HepMC3.spec +++ b/HepMC3.spec @@ -11,6 +11,13 @@ Source0: https://hepmc.web.cern.ch/hepmc/releases/%%7Bname%7D-%%7Bversion%7D.tar.gz Patch0: %{name}-config.patch # Reduce memory usage when building Python bindings on ARM Patch1: %{name}-arm-memory.patch +# The same test for different python versions must not +# overwrite eachother's files +# https://gitlab.cern.ch/hepmc/HepMC3/merge_requests/56 +Patch2: %{name}-python-tests.patch +# Workaround for root problem on EPEL 7 ppc64le +# https://sft.its.cern.ch/jira/browse/ROOT-10622 +Patch3: %{name}-root-bug-workaround.patch
# The ROOT cmake file used by this project requires cmake 3.9 %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 @@ -36,6 +43,15 @@ BuildRequires: python%{python3_other_pkgversion}-devel %endif BuildRequires: python%{python3_pkgversion}-devel
+%if %{?rhel}%{!?rhel:0} == 7 +%ifarch ppc64le +# Workaround for root problem on EPEL 7 ppc64le +BuildRequires: python2-root +BuildRequires: python%{python3_other_pkgversion}-root +BuildRequires: python%{python3_pkgversion}-root +%endif +%endif + %description The HepMC3 package is an object oriented, C++ event record for High Energy Physics Monte Carlo generators and simulation. @@ -189,6 +205,13 @@ This package provides HepMC manuals and examples. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%if %{?rhel}%{!?rhel:0} == 7 +%ifarch ppc64le +# Workaround for root problem on EPEL 7 ppc64le +%patch3 -p1 +%endif +%endif
%build %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
arch-excludes@lists.fedoraproject.org