diff --git a/arbor.spec b/arbor.spec index b6f2482..d91e333 100644 --- a/arbor.spec +++ b/arbor.spec @@ -33,18 +33,21 @@ 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 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval -ExcludeArch: mips64r2 mips32r2 s390 %{ix86} +ExcludeArch: mips64r2 mips32r2 s390x %{ix86} BuildRequires: cmake BuildRequires: make @@ -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 @@ -208,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 \\\ 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.