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=2fd51707f0e....
Change:
+%ifnarch s390x
Thanks.
Full change:
============
commit 2fd51707f0e66908b209a9ca04663287160c1f35
Author: Mattias Ellert <mattias.ellert(a)physics.uu.se>
Date: Tue Mar 24 15:34:40 2020 +0100
Update to version 3.2.1
Drop patches accepted upstream or previously backported
Fix glitches in the generation of the HepMC3-config script
Add additional Python 3 version package for EPEL 7
(cmake configuration now supports multiple Python 3 versions)
Use new cmake configuration options -DHEPMC3_ROOTIO_INSTALL_LIBDIR and
-DHEPMC3_BUILD_STATIC_LIBS and simplify spec file accordingly
.egg-info filenames are now correct - auto generated provides work
diff --git a/HepMC3-arm-memory.patch b/HepMC3-arm-memory.patch
index 8fb0713..c06fef4 100644
--- a/HepMC3-arm-memory.patch
+++ b/HepMC3-arm-memory.patch
@@ -1,13 +1,14 @@
-diff -ur HepMC3-3.2.0.orig/python/CMakeLists.txt HepMC3-3.2.0/python/CMakeLists.txt
---- HepMC3-3.2.0.orig/python/CMakeLists.txt 2019-11-27 11:20:01.000000000 +0100
-+++ HepMC3-3.2.0/python/CMakeLists.txt 2019-12-02 14:44:49.752598636 +0100
-@@ -141,6 +141,9 @@
+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
new file mode 100644
index 0000000..dba83ed
--- /dev/null
+++ b/HepMC3-config.patch
@@ -0,0 +1,190 @@
+From 4888b9d8a8f60f5a77b9ce102913ac74500af701 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)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(a)/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(a)/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-python-3.9.patch b/HepMC3-python-3.9.patch
deleted file mode 100644
index 77766e5..0000000
--- a/HepMC3-python-3.9.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From a68f8af21f79909de1a2e8318070940c197c72ab Mon Sep 17 00:00:00 2001
-From: Andrii Verbytskyi <andrii.verbytskyi(a)cern.ch>
-Date: Mon, 27 Jan 2020 10:32:49 +0000
-Subject: [PATCH] Update Support.cmake To add Python 3.9 to the list of valid
- versions.
-
----
- cmake/Modules/FindPython/Support.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmake/Modules/FindPython/Support.cmake
b/cmake/Modules/FindPython/Support.cmake
-index 08f07fd..0191972 100644
---- a/cmake/Modules/FindPython/Support.cmake
-+++ b/cmake/Modules/FindPython/Support.cmake
-@@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
- message (FATAL_ERROR "FindPython: INTERNAL ERROR")
- endif()
- if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
-- set(_${_PYTHON_PREFIX}_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
-+ set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
- elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
- set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
- else()
---
-2.24.1
-
diff --git a/HepMC3-python-test.patch b/HepMC3-python-test.patch
deleted file mode 100644
index ecb88ff..0000000
--- a/HepMC3-python-test.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c1f27814cde97869ec2dd1063405a5260e4e1193 Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Mon, 2 Dec 2019 08:57:06 +0100
-Subject: [PATCH] Change import order to avoid Import Error:
-
- Start 45: python3.7.5_test_IO2
-44/46 Test #45: python3.7.5_test_IO2 ........................***Failed 10.20 sec
-Traceback (most recent call last):
- File "test_IO2.py", line 7, in <module>
- import pyHepMC3.rootIO.pyHepMC3rootIO.HepMC3 as hmrootIO
-ImportError: generic_type: type "WriterRootTree" referenced unknown base type
"HepMC3::Writer"
----
- python/test/test_IO2.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/python/test/test_IO2.py b/python/test/test_IO2.py
-index 4b71276..2cb0331 100644
---- a/python/test/test_IO2.py
-+++ b/python/test/test_IO2.py
-@@ -4,8 +4,8 @@ sys.path=update_path()
-
-
- from pyHepMC3TestUtils import COMPARE_ASCII_FILES
--import pyHepMC3.rootIO.pyHepMC3rootIO.HepMC3 as hmrootIO
- import pyHepMC3.pyHepMC3.HepMC3 as hm
-+import pyHepMC3.rootIO.pyHepMC3rootIO.HepMC3 as hmrootIO
- print(dir(hmrootIO))
- def test_IO2():
- inputA=hm.ReaderAsciiHepMC2("inputIO2.hepmc")
---
-2.23.0
-
diff --git a/HepMC3.spec b/HepMC3.spec
index 77408bf..c0e67e3 100644
--- a/HepMC3.spec
+++ b/HepMC3.spec
@@ -1,25 +1,22 @@
Name: HepMC3
-Version: 3.2.0
-Release: 3%{?dist}
+Version: 3.2.1
+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/%{name}-%{version}.tar.gz
-# Change import order to avoid Import Error
-#
https://gitlab.cern.ch/hepmc/HepMC3/merge_requests/45
-Patch0: %{name}-python-test.patch
+# 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
-# Add Python 3.9 as a valid Python version
-# Backported from upstream git
-Patch2: %{name}-python-3.9.patch
-# The ROOT cmake file used by this project requires cmake 3.4.3
+# The ROOT cmake file used by this project requires cmake 3.9
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
-BuildRequires: cmake >= 3.4.3
+BuildRequires: cmake >= 3.9
%else
-BuildRequires: cmake3 >= 3.4.3
+BuildRequires: cmake3 >= 3.9
%endif
BuildRequires: gcc-c++
%ifnarch s390x
@@ -35,6 +32,7 @@ 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
@@ -122,6 +120,34 @@ Requires: python2-%{name}%{?_isa} = %{version}-%{release}
%description -n python2-%{name}-rootIO
This package provides the Python 2 bindings for HepMC3 ROOT I/O module.
%endif
+
+%package -n python%{python3_other_pkgversion}-%{name}
+Summary: HepMC3 Python 3 bindings
+%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{name}}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description -n python%{python3_other_pkgversion}-%{name}
+This package provides the Python 3 bindings for HepMC3.
+
+%package -n python%{python3_other_pkgversion}-%{name}-search
+Summary: HepMC3 search module Python 3 bindings
+%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{name}-search}
+Requires: %{name}-search%{?_isa} = %{version}-%{release}
+Requires: python%{python3_other_pkgversion}-%{name}%{?_isa} = %{version}-%{release}
+
+%description -n python%{python3_other_pkgversion}-%{name}-search
+This package provides the Python 3 bindings for HepMC3 search module.
+
+%ifnarch s390x
+%package -n python%{python3_other_pkgversion}-%{name}-rootIO
+Summary: HepMC3 ROOT I/O module Python 3 bindings
+%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{name}-rootIO}
+Requires: %{name}-rootIO%{?_isa} = %{version}-%{release}
+Requires: python%{python3_other_pkgversion}-%{name}%{?_isa} = %{version}-%{release}
+
+%description -n python%{python3_other_pkgversion}-%{name}-rootIO
+This package provides the Python 3 bindings for HepMC3 ROOT I/O module.
+%endif
%endif
%package -n python%{python3_pkgversion}-%{name}
@@ -163,7 +189,6 @@ This package provides HepMC manuals and examples.
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%build
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
@@ -173,33 +198,27 @@ This package provides HepMC manuals and examples.
%endif
%ifnarch s390x
-DHEPMC3_ENABLE_ROOTIO:BOOL=ON \
+ -DHEPMC3_ROOTIO_INSTALL_LIBDIR:PATH=%{_libdir}/root \
%else
-DHEPMC3_ENABLE_ROOTIO:BOOL=OFF \
%endif
-DHEPMC3_ENABLE_TEST:BOOL=ON \
-DHEPMC3_INSTALL_INTERFACES:BOOL=ON \
%if %{?rhel}%{!?rhel:0} == 7
- -DHEPMC3_PYTHON_VERSIONS=2,%python3_version \
+ -DHEPMC3_PYTHON_VERSIONS=2,%python3_version,%python3_other_version \
%else
-DHEPMC3_PYTHON_VERSIONS=%python3_version \
%endif
-DHEPMC3_BUILD_DOCS:BOOL=ON \
+ -DHEPMC3_BUILD_STATIC_LIBS:BOOL=OFF \
-DCMAKE_INSTALL_DOCDIR:PATH=%{_pkgdocdir} \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON .
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
-rm %{buildroot}%{_libdir}/*.a
cp -pr examples %{buildroot}%{_pkgdocdir}
-%ifnarch s390x
-# Move to root directory
-mkdir %{buildroot}%{_libdir}/root
-mv %{buildroot}%{_libdir}/libHepMC3rootIO* %{buildroot}%{_libdir}/root
-sed 's!\s*-lHepMC3rootIO!/root&!' -i %{buildroot}%{_bindir}/HepMC3-config
-%endif
-
%check
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
ctest %{?_smp_mflags} --output-on-failure
@@ -309,14 +328,37 @@ ctest3 %{?_smp_mflags} --output-on-failure
%dir %{python2_sitearch}/pyHepMC3/search
%{python2_sitearch}/pyHepMC3/search/__init__.py*
%{python2_sitearch}/pyHepMC3/search/pyHepMC3search.so
-%{python2_sitearch}/pyHepMC3-search-*.egg-info
+%{python2_sitearch}/pyHepMC3.search-*.egg-info
%ifnarch s390x
%files -n python2-%{name}-rootIO
%dir %{python2_sitearch}/pyHepMC3/rootIO
%{python2_sitearch}/pyHepMC3/rootIO/__init__.py*
%{python2_sitearch}/pyHepMC3/rootIO/pyHepMC3rootIO.so
-%{python2_sitearch}/pyHepMC3-rootIO-*.egg-info
+%{python2_sitearch}/pyHepMC3.rootIO-*.egg-info
+%endif
+
+%files -n python%{python3_other_pkgversion}-%{name}
+%dir %{python3_other_sitearch}/pyHepMC3
+%{python3_other_sitearch}/pyHepMC3/__init__.py
+%{python3_other_sitearch}/pyHepMC3/__pycache__
+%{python3_other_sitearch}/pyHepMC3/pyHepMC3.so
+%{python3_other_sitearch}/pyHepMC3-*.egg-info
+
+%files -n python%{python3_other_pkgversion}-%{name}-search
+%dir %{python3_other_sitearch}/pyHepMC3/search
+%{python3_other_sitearch}/pyHepMC3/search/__init__.py
+%{python3_other_sitearch}/pyHepMC3/search/__pycache__
+%{python3_other_sitearch}/pyHepMC3/search/pyHepMC3search.so
+%{python3_other_sitearch}/pyHepMC3.search-*.egg-info
+
+%ifnarch s390x
+%files -n python%{python3_other_pkgversion}-%{name}-rootIO
+%dir %{python3_other_sitearch}/pyHepMC3/rootIO
+%{python3_other_sitearch}/pyHepMC3/rootIO/__init__.py
+%{python3_other_sitearch}/pyHepMC3/rootIO/__pycache__
+%{python3_other_sitearch}/pyHepMC3/rootIO/pyHepMC3rootIO.so
+%{python3_other_sitearch}/pyHepMC3.rootIO-*.egg-info
%endif
%endif
@@ -332,7 +374,7 @@ ctest3 %{?_smp_mflags} --output-on-failure
%{python3_sitearch}/pyHepMC3/search/__init__.py
%{python3_sitearch}/pyHepMC3/search/__pycache__
%{python3_sitearch}/pyHepMC3/search/pyHepMC3search.so
-%{python3_sitearch}/pyHepMC3-search-*.egg-info
+%{python3_sitearch}/pyHepMC3.search-*.egg-info
%ifnarch s390x
%files -n python%{python3_pkgversion}-%{name}-rootIO
@@ -340,7 +382,7 @@ ctest3 %{?_smp_mflags} --output-on-failure
%{python3_sitearch}/pyHepMC3/rootIO/__init__.py
%{python3_sitearch}/pyHepMC3/rootIO/__pycache__
%{python3_sitearch}/pyHepMC3/rootIO/pyHepMC3rootIO.so
-%{python3_sitearch}/pyHepMC3-rootIO-*.egg-info
+%{python3_sitearch}/pyHepMC3.rootIO-*.egg-info
%endif
%files doc
@@ -350,6 +392,16 @@ ctest3 %{?_smp_mflags} --output-on-failure
%license COPYING
%changelog
+* Sun Mar 22 2020 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 3.2.1-1
+- Update to version 3.2.1
+- Drop patches accepted upstream or previously backported
+- Fix glitches in the generation of the HepMC3-config script
+- Add additional Python 3 version package for EPEL 7
+ (cmake configuration now supports multiple Python 3 versions)
+- Use new cmake configuration options -DHEPMC3_ROOTIO_INSTALL_LIBDIR and
+ -DHEPMC3_BUILD_STATIC_LIBS and simplify spec file accordingly
+- .egg-info filenames are now correct - auto generated provides work
+
* Tue Jan 28 2020 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 3.2.0-3
- Add Python 3.9 as a valid Python version
commit 3e286666a5ee642b1e0fe6d1baeb6848217956a8
Author: Mattias Ellert <mattias.ellert(a)physics.uu.se>
Date: Mon Feb 17 07:39:06 2020 +0100
Add Python 3.9 as a valid Python version
diff --git a/HepMC3-python-3.9.patch b/HepMC3-python-3.9.patch
new file mode 100644
index 0000000..77766e5
--- /dev/null
+++ b/HepMC3-python-3.9.patch
@@ -0,0 +1,26 @@
+From a68f8af21f79909de1a2e8318070940c197c72ab Mon Sep 17 00:00:00 2001
+From: Andrii Verbytskyi <andrii.verbytskyi(a)cern.ch>
+Date: Mon, 27 Jan 2020 10:32:49 +0000
+Subject: [PATCH] Update Support.cmake To add Python 3.9 to the list of valid
+ versions.
+
+---
+ cmake/Modules/FindPython/Support.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/Modules/FindPython/Support.cmake
b/cmake/Modules/FindPython/Support.cmake
+index 08f07fd..0191972 100644
+--- a/cmake/Modules/FindPython/Support.cmake
++++ b/cmake/Modules/FindPython/Support.cmake
+@@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
+ message (FATAL_ERROR "FindPython: INTERNAL ERROR")
+ endif()
+ if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
+- set(_${_PYTHON_PREFIX}_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
++ set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+ elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
+ set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
+ else()
+--
+2.24.1
+
diff --git a/HepMC3.spec b/HepMC3.spec
index c3f7ab8..77408bf 100644
--- a/HepMC3.spec
+++ b/HepMC3.spec
@@ -1,6 +1,6 @@
Name: HepMC3
Version: 3.2.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: C++ Event Record for Monte Carlo Generators
License: GPLv3+
@@ -11,6 +11,9 @@
Source0:
https://hepmc.web.cern.ch/hepmc/releases/%{name}-%{version}.tar.gz
Patch0: %{name}-python-test.patch
# Reduce memory usage when building Python bindings on ARM
Patch1: %{name}-arm-memory.patch
+# Add Python 3.9 as a valid Python version
+# Backported from upstream git
+Patch2: %{name}-python-3.9.patch
# The ROOT cmake file used by this project requires cmake 3.4.3
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
@@ -160,6 +163,7 @@ This package provides HepMC manuals and examples.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
@@ -346,6 +350,9 @@ ctest3 %{?_smp_mflags} --output-on-failure
%license COPYING
%changelog
+* Tue Jan 28 2020 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 3.2.0-3
+- Add Python 3.9 as a valid Python version
+
* Tue Jan 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.2.0-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
commit 7b670ccc1032b0642d8a5dc87382c1a56de8306d
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Tue Jan 28 09:27:42 2020 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/HepMC3.spec b/HepMC3.spec
index 22fa434..c3f7ab8 100644
--- a/HepMC3.spec
+++ b/HepMC3.spec
@@ -1,6 +1,6 @@
Name: HepMC3
Version: 3.2.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: C++ Event Record for Monte Carlo Generators
License: GPLv3+
@@ -346,6 +346,9 @@ ctest3 %{?_smp_mflags} --output-on-failure
%license COPYING
%changelog
+* Tue Jan 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.2.0-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
* Thu Nov 28 2019 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 3.2.0-1
- Update to version 3.2.0
- Add Python packages