diff --git a/_service b/_service index 750340c..e423449 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ https://github.com/kpeeters/cadabra2.git git - 2.5.4 + 2.5.6 @PARENT_TAG@ cadabra2 enable diff --git a/cadabra2-2.5.4.obscpio b/cadabra2-2.5.4.obscpio deleted file mode 100644 index 383a92c..0000000 --- a/cadabra2-2.5.4.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f130d667383d2504e4b36f468684b86f01730a86051d98d65409f0635e35e3ac -size 87038478 diff --git a/cadabra2-2.5.6.obscpio b/cadabra2-2.5.6.obscpio new file mode 100644 index 0000000..041cf31 --- /dev/null +++ b/cadabra2-2.5.6.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b72b5c5f0cbe491c917076d7ec57b28ed721bc4d37958a1ec73c23c23fc9932 +size 87088654 diff --git a/cadabra2-cmake-correct-python-variable.patch b/cadabra2-cmake-correct-python-variable.patch deleted file mode 100644 index bdbfdca..0000000 --- a/cadabra2-cmake-correct-python-variable.patch +++ /dev/null @@ -1,86 +0,0 @@ -Index: cadabra2-2.5.4/CMakeLists.txt -=================================================================== ---- cadabra2-2.5.4.orig/CMakeLists.txt -+++ cadabra2-2.5.4/CMakeLists.txt -@@ -325,7 +325,7 @@ else() - # calling into python's 'site' package (and hoping that the 0th - # element is where we should be writing). - execute_process( -- COMMAND ${PYTHON_EXECUTABLE} -c "import site; print(site.getsitepackages()[0])" -+ COMMAND ${Python_EXECUTABLE} -c "import site; print(site.getsitepackages()[0])" - OUTPUT_VARIABLE PYTHON_SITE_PATH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -@@ -339,7 +339,7 @@ message(STATUS "Installing Python module - # contain the abi name. See - # https://www.python.org/dev/peps/pep-3149/ - execute_process( -- COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))" -+ COMMAND ${Python_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))" - OUTPUT_VARIABLE PYTHON_SOABI - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -@@ -350,7 +350,7 @@ set(PYTHON_SITE_PATH_REL ${PYTHON_SITE_P - - if(NOT WIN32) - execute_process( -- COMMAND ${PYTHON_EXECUTABLE} -c "import site; print (site.getsitepackages()[0]);" -+ COMMAND ${Python_EXECUTABLE} -c "import site; print (site.getsitepackages()[0]);" - OUTPUT_VARIABLE OLDER_PYTHON_SITE_PATH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -Index: cadabra2-2.5.4/core/cadabra2.in -=================================================================== ---- cadabra2-2.5.4.orig/core/cadabra2.in -+++ cadabra2-2.5.4/core/cadabra2.in -@@ -1,4 +1,4 @@ --#!${PYTHON_EXECUTABLE} -+#!${Python_EXECUTABLE} - # - # \ingroup pythoncore - # -@@ -119,8 +119,8 @@ if __name__ == '__main__': - - if len(sys.argv)>1: - if '-d' in sys.argv: -- #rs = "lldb -ex r --args ${PYTHON_EXECUTABLE} "+sys.argv[0]; -- rs = "gdb -q -ex r --args ${PYTHON_EXECUTABLE} "+sys.argv[0]; -+ #rs = "lldb -ex r --args ${Python_EXECUTABLE} "+sys.argv[0]; -+ rs = "gdb -q -ex r --args ${Python_EXECUTABLE} "+sys.argv[0]; - for a in sys.argv[1:]: - if a!='-d': - rs += " "+a -Index: cadabra2-2.5.4/jupyterkernel/kernelspec/kernel.json.in -=================================================================== ---- cadabra2-2.5.4.orig/jupyterkernel/kernelspec/kernel.json.in -+++ cadabra2-2.5.4/jupyterkernel/kernelspec/kernel.json.in -@@ -1,6 +1,6 @@ - { - "argv": [ -- "@PYTHON_EXECUTABLE@", "-m", "cadabra2_jupyter", "-f", "{connection_file}" -+ "@Python_EXECUTABLE@", "-m", "cadabra2_jupyter", "-f", "{connection_file}" - ], - "display_name":"Cadabra2", - "language":"python" -Index: cadabra2-2.5.4/tests/CMakeLists.txt -=================================================================== ---- cadabra2-2.5.4.orig/tests/CMakeLists.txt -+++ cadabra2-2.5.4/tests/CMakeLists.txt -@@ -49,7 +49,7 @@ foreach(NBTEST ${NBTESTS}) - ARGS ${CNBIN}/${NBTEST}.cnb ${CDBOUT}/${NBTEST}.cdb - COMMENT "Creating ${NBTEST} notebook...") - add_custom_target("${NBTEST}_test" ALL DEPENDS ${CDBOUT}/${NBTEST}.cdb) -- add_test(${NBTEST} ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/core/cadabra2 ${CDBOUT}/${NBTEST}.cdb) -+ add_test(${NBTEST} ${Python_EXECUTABLE} ${CMAKE_SOURCE_DIR}/core/cadabra2 ${CDBOUT}/${NBTEST}.cdb) - set_tests_properties(${NBTEST} PROPERTIES ENVIRONMENT "PYTHONPATH=${PYTHONPATH};LANG=en_US.UTF-8;LC_ALL=en_US.UTF-8;PYTHONIOENCODING=utf-8") - endforeach() - -@@ -100,7 +100,7 @@ if(MATHEMATICA_FOUND) - set(RTESTS ${RTESTS} mma) - endif() - foreach(RTEST ${RTESTS}) -- add_test(${RTEST} ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/core/cadabra2 ${CMAKE_SOURCE_DIR}/tests/${RTEST}.cdb) -+ add_test(${RTEST} ${Python_EXECUTABLE} ${CMAKE_SOURCE_DIR}/core/cadabra2 ${CMAKE_SOURCE_DIR}/tests/${RTEST}.cdb) - # We need to set the Python path so that we pick up the correct cadabra2.so Python module - # even if we did not do 'make install' yet. - set_tests_properties(${RTEST} PROPERTIES ENVIRONMENT "PYTHONPATH=${PYTHONPATH};LANG=en_US.UTF-8;LC_ALL=en_US.UTF-8;PYTHONIOENCODING=utf-8") diff --git a/cadabra2-default-python-path.patch b/cadabra2-default-python-path.patch new file mode 100644 index 0000000..35c3fc9 --- /dev/null +++ b/cadabra2-default-python-path.patch @@ -0,0 +1,21 @@ +--- + core/pythoncdb/py_helpers.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +Index: cadabra2-2.5.6/core/pythoncdb/py_helpers.cc +=================================================================== +--- cadabra2-2.5.6.orig/core/pythoncdb/py_helpers.cc ++++ cadabra2-2.5.6/core/pythoncdb/py_helpers.cc +@@ -45,8 +45,10 @@ namespace cadabra { + + if(spath=="") { + py::module_ sysconfig = py::module_::import("sysconfig"); +- py::object result = sysconfig.attr("get_path")("platlib"); +- spath = result.cast(); ++ // On openSUSE, this gives paths relative to /usr/local/; use 'stdlib' instead ++ // py::object result = sysconfig.attr("get_path")("platlib"); ++ py::object result = sysconfig.attr("get_path")("stdlib"); ++ spath = result.cast() + "/site-packages"; + // Some older systems return the wrong path in platlib: they + // use "dist-packages", but still return "site-packages". So we + // test for the existence of platlib, and if it does not diff --git a/cadabra2-link-gmp.patch b/cadabra2-link-gmp.patch deleted file mode 100644 index 8084892..0000000 --- a/cadabra2-link-gmp.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: cadabra2-2.5.4/core/packages/CMakeLists.txt -=================================================================== ---- cadabra2-2.5.4.orig/core/packages/CMakeLists.txt -+++ cadabra2-2.5.4/core/packages/CMakeLists.txt -@@ -67,7 +67,7 @@ foreach(PACKAGE ${COMPILED_PACKAGES}) - set_target_properties(${PNAME} PROPERTIES SUFFIX ".${PYTHON_MOD_SUFFIX}") - set_target_properties(${PNAME} PROPERTIES INSTALL_RPATH "$ORIGIN/../../:$ORIGIN/../../../../") - -- target_link_libraries(${PNAME} PUBLIC cadabra2 ${GMPXX_LIBRARIES}) -+ target_link_libraries(${PNAME} PUBLIC cadabra2 ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) - target_include_directories(${PNAME} PUBLIC ${CADABRA_CORE_DIR}) - - if(IPO_SUPPORTED) - diff --git a/cadabra2-use-system-pybind11.patch b/cadabra2-use-system-pybind11.patch deleted file mode 100644 index b90ebf5..0000000 --- a/cadabra2-use-system-pybind11.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- - CMakeLists.txt | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -Index: cadabra2-2.5.4/CMakeLists.txt -=================================================================== ---- cadabra2-2.5.4.orig/CMakeLists.txt -+++ cadabra2-2.5.4/CMakeLists.txt -@@ -297,7 +297,10 @@ set(PYTHON_POSTFIX "3") - # message(STATUS "Building for use with Python 3 (good!)") - - find_package(Python COMPONENTS Interpreter Development) --add_subdirectory(libs/pybind11) -+find_package(pybind11 CONFIG) -+if (NOT pybind11_FOUND) -+ add_subdirectory(libs/pybind11) -+endif() - - message(STATUS "Found python ${PYTHON_LIBRARIES}") - #find_package (Python COMPONENTS Interpreter) diff --git a/cadabra2.changes b/cadabra2.changes index 9697193..746b9de 100644 --- a/cadabra2.changes +++ b/cadabra2.changes @@ -1,7 +1,20 @@ +------------------------------------------------------------------- +Mon Oct 7 19:25:33 UTC 2024 - Atri Bhattacharya + +- Update to version 2.5.6: + * Clean up code to locate the Python installation substantially + to avoid references to hard-coded paths in binaries. +- Drop upstreamed patches: + * cadabra2-cmake-correct-python-variable.patch. + * cadabra2-use-system-pybind11.patch. + * cadabra2-link-gmp.patch. +- Add cadabra2-default-python-path.patch: Fix default python path + when starting up cadabra2. + ------------------------------------------------------------------- Mon Aug 12 04:32:18 UTC 2024 - Atri Bhattacharya -- Update to version 2.5.2: +- Update to version 2.5.4: * Fix simplification of pow nodes. * Make ExNode iterators skip nodes hidden by zoom. * Fix canonicalise acting on expressions with diff --git a/cadabra2.obsinfo b/cadabra2.obsinfo index fea8efd..35d2ab8 100644 --- a/cadabra2.obsinfo +++ b/cadabra2.obsinfo @@ -1,4 +1,4 @@ name: cadabra2 -version: 2.5.4 -mtime: 1723292700 -commit: 940443b1e78b2b191caa23307c74703202bedf13 +version: 2.5.6 +mtime: 1727641956 +commit: a60a615f8addb44edb2cf97a146bda662b4eef48 diff --git a/cadabra2.spec b/cadabra2.spec index 411914e..61f35c5 100644 --- a/cadabra2.spec +++ b/cadabra2.spec @@ -27,7 +27,7 @@ %global pythons python3 %endif Name: cadabra2 -Version: 2.5.4 +Version: 2.5.6 Release: 0 Summary: A computer algebra system for solving problems in field theory License: GPL-3.0-or-later @@ -36,12 +36,8 @@ URL: https://cadabra.science/ Source0: %{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM cadabra2-disable-components-test.patch gh#kpeeters/cadabra2#212 badshah400@gmail.com -- Disable a test that crashes for unknown reasons Patch0: cadabra2-disable-components-test.patch -# PATCH-FIX-UPSTREAM cadabra2-link-gmp.patch badshah400@gmail.com -- Link against gmp shared lib explicitly -Patch1: cadabra2-link-gmp.patch -# PATCH-FIX-UPSTREAM cadabra2-use-system-pybind11.patch gh#kpeeters/cadabra2#310 badshah400@gmail.com -- Allow use of system pybind11, fall back to bundled sources if not found -Patch2: cadabra2-use-system-pybind11.patch -# PATCH-FIX-UPSTREAM cadabra2-cmake-correct-python-variable.patch gh#kpeeters/cadabra2#309 badshah400@gmail.com -- Use correct variable set by cmake FindPython, i.e. Python_EXECUTABLE, not PYTHON_EXECUTABLE -Patch3: cadabra2-cmake-correct-python-variable.patch +# PATCH-FEATURE-OPENSUSE cadabra2-default-python-path.patch badshah400@gmail.com -- Fix default python path when starting up cadabra2 +Patch1: cadabra2-default-python-path.patch BuildRequires: %{python_module devel >= 3.9} BuildRequires: %{python_module gobject-devel} BuildRequires: %{python_module ipykernel}