From 9b31ac866770e20c5f6c7c96cd6b7e41690b1007 Mon Sep 17 00:00:00 2001 From: Sandro Date: Thu, 20 Jul 2023 11:15:19 +0200 Subject: [PATCH 1/3] Fix use of distutils (RHBZ#2219935) --- arbor.spec | 6 +++++- looseversion.patch | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 looseversion.patch diff --git a/arbor.spec b/arbor.spec index b6f2482..2d6941f 100644 --- a/arbor.spec +++ b/arbor.spec @@ -33,13 +33,16 @@ Source0: %forgesource # script to run examples Source1: https://raw.githubusercontent.com/arbor-sim/arbor/master/scripts/run_python_examples.sh Source2: https://raw.githubusercontent.com/arbor-sim/arbor/master/scripts/run_cpp_examples.sh -License: BSD +License: BSD-3-Clause Patch: 0001-Quote-various-cmake-var-values.patch # Add some missing #include directives # Fixes failure to compile with GCC 13. # https://github.com/arbor-sim/arbor/pull/2080 Patch: %{forgeurl}/pull/2080.patch +# Replace use of LooseVersion from distutils.version (removed in Python3.12) +# https://github.com/arbor-sim/arbor/pull/2157 +Patch: looseversion.patch # Random123 does not support: # mips64r2 mips32r2 s390 @@ -60,6 +63,7 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: Random123-devel BuildRequires: tclap-devel +BuildRequires: pugixml-devel Provides: python3-arbor = %{version}-%{release} # For validation, but we don't have these BRs diff --git a/looseversion.patch b/looseversion.patch new file mode 100644 index 0000000..65fde4a --- /dev/null +++ b/looseversion.patch @@ -0,0 +1,25 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 0d732541..12e003e2 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -46,6 +46,7 @@ requires = [ + "scikit-build", + "cmake>=3.18", + "ninja", ++ "looseversion", + ] + build-backend = "setuptools.build_meta" + +diff --git a/scripts/tsplot b/scripts/tsplot +index c64e7b18..10ddf3f4 100755 +--- a/scripts/tsplot ++++ b/scripts/tsplot +@@ -11,7 +11,7 @@ import matplotlib as M + import matplotlib.pyplot as P + import numbers + from functools import reduce +-from distutils.version import LooseVersion ++from looseversion import LooseVersion + from itertools import chain, islice, cycle + + # Run-time check for matplot lib version for line style functionality. From 075e102ba4f72af2169208247dbcc9dfb6a94cf2 Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 21 Jul 2023 16:45:28 +0200 Subject: [PATCH 2/3] Fix ExcludeArch - s/s390/s390x/ --- arbor.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arbor.spec b/arbor.spec index 2d6941f..32150a3 100644 --- a/arbor.spec +++ b/arbor.spec @@ -47,7 +47,7 @@ Patch: looseversion.patch # Random123 does not support: # mips64r2 mips32r2 s390 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval -ExcludeArch: mips64r2 mips32r2 s390 %{ix86} +ExcludeArch: mips64r2 mips32r2 s390x %{ix86} BuildRequires: cmake BuildRequires: make From 5f9c71a9f39cbf6b302c7b894f3e51cac3449e5f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 6 Nov 2023 07:41:38 -0500 Subject: [PATCH 3/3] Do not enable extra ISA extensions based on the build host We must confine ourselves to the baseline features of each architecture unless runtime feature detection is used. --- arbor.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arbor.spec b/arbor.spec index 32150a3..d91e333 100644 --- a/arbor.spec +++ b/arbor.spec @@ -212,18 +212,10 @@ pushd build$MPI_COMPILE_TYPE && -DCMAKE_BUILD_TYPE:STRING="release" \\\ -DARB_USE_BUNDLED_LIBS:BOOL=OFF \\\ -DARB_USE_BUNDLED_PYBIND11:BOOL=OFF \\\ -%ifarch x86_64 i686 aarch64 - -DARB_VECTORIZE:BOOL=ON \\\ -%else -DARB_VECTORIZE:BOOL=OFF \\\ -%endif -DARB_WITH_MPI:BOOL=$MPI_YES \\\ -DARB_WITH_GPU:BOOL=OFF \\\ -%ifnarch s390x s390 - -DARB_ARCH:STRING="native" \\\ -%else -DARB_ARCH:STRING="none" \\\ -%endif -DCMAKE_INSTALL_LIBDIR=%{_lib} \\\ -DARB_WITH_PYTHON:BOOL=ON \\\ -DARB_PYTHON_LIB_PATH:STRING=$MPI_PYTHON3_SITEARCH \\\