From 2e797c740388a6c69919eac99d3d8beff87c2338387455dc320671b8d86b4700 Mon Sep 17 00:00:00 2001 From: Dmitry Roshchin Date: Tue, 8 Oct 2024 05:33:25 +0000 Subject: [PATCH] * Update to version 2.5.6. * 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. OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=62 --- .gitattributes | 23 + .gitignore | 1 + _constraints | 8 + _service | 18 + cadabra2-2.4.5.6.tar.gz | 3 + cadabra2-2.5.4.obscpio | 3 + cadabra2-2.5.6.obscpio | 3 + cadabra2-cmake-correct-python-variable.patch | 86 +++ cadabra2-default-python-path.patch | 21 + cadabra2-disable-components-test.patch | 12 + cadabra2-gtk.appdata.xml | 27 + cadabra2-link-gmp.patch | 14 + cadabra2-link-python.patch | 27 + cadabra2-use-system-pybind11.patch | 20 + cadabra2.changes | 527 +++++++++++++++++++ cadabra2.obsinfo | 4 + cadabra2.spec | 235 +++++++++ 17 files changed, 1032 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _constraints create mode 100644 _service create mode 100644 cadabra2-2.4.5.6.tar.gz create mode 100644 cadabra2-2.5.4.obscpio create mode 100644 cadabra2-2.5.6.obscpio create mode 100644 cadabra2-cmake-correct-python-variable.patch create mode 100644 cadabra2-default-python-path.patch create mode 100644 cadabra2-disable-components-test.patch create mode 100644 cadabra2-gtk.appdata.xml create mode 100644 cadabra2-link-gmp.patch create mode 100644 cadabra2-link-python.patch create mode 100644 cadabra2-use-system-pybind11.patch create mode 100644 cadabra2.changes create mode 100644 cadabra2.obsinfo create mode 100644 cadabra2.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..39eb33d --- /dev/null +++ b/_constraints @@ -0,0 +1,8 @@ + + + + 4 + + + + diff --git a/_service b/_service new file mode 100644 index 0000000..e423449 --- /dev/null +++ b/_service @@ -0,0 +1,18 @@ + + + + https://github.com/kpeeters/cadabra2.git + git + 2.5.6 + @PARENT_TAG@ + cadabra2 + enable + + + + *.tar + xz + + + + diff --git a/cadabra2-2.4.5.6.tar.gz b/cadabra2-2.4.5.6.tar.gz new file mode 100644 index 0000000..1f46441 --- /dev/null +++ b/cadabra2-2.4.5.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a3ebe3debd6efdd5f20a3c78acc2ef8933135d5f43da39b6ea107be94a9413c +size 26827151 diff --git a/cadabra2-2.5.4.obscpio b/cadabra2-2.5.4.obscpio new file mode 100644 index 0000000..383a92c --- /dev/null +++ b/cadabra2-2.5.4.obscpio @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..bdbfdca --- /dev/null +++ b/cadabra2-cmake-correct-python-variable.patch @@ -0,0 +1,86 @@ +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-disable-components-test.patch b/cadabra2-disable-components-test.patch new file mode 100644 index 0000000..3504e5e --- /dev/null +++ b/cadabra2-disable-components-test.patch @@ -0,0 +1,12 @@ +Index: cadabra2-2.3.9.3/tests/CMakeLists.txt +=================================================================== +--- cadabra2-2.3.9.3.orig/tests/CMakeLists.txt ++++ cadabra2-2.3.9.3/tests/CMakeLists.txt +@@ -69,7 +69,6 @@ set(RTESTS + trigonometric + noncovariant + algebra +- components + factor + field_theory + gamma_paper diff --git a/cadabra2-gtk.appdata.xml b/cadabra2-gtk.appdata.xml new file mode 100644 index 0000000..fbfaede --- /dev/null +++ b/cadabra2-gtk.appdata.xml @@ -0,0 +1,27 @@ + + + cadabra2-gtk.desktop + CC0-1.0 + Cadabra 2 + GPL-3.0+ + A computer algebra system for problems in field theory + http://cadabra.science/ + +

Cadabra2 is a computer algebra system (CAS) designed specifically for +the solution of problems encountered in field theory.

+

It has been designed specifically for the solution of problems encountered +in quantum and classical field theory. It has extensive functionality +for tensor computer algebra, tensor polynomial simplification +including multi-term symmetries, fermions and anti-commuting +variables, Clifford algebras and Fierz transformations, implicit +coordinate dependence, multiple index types and many more. The input +format is a subset of TeX.

+
+ + + https://cadabra.science/static/images/screenshot.png + Gamma matrix algebra in a Cadabra2 notebook + + + info@cadabra.science +
diff --git a/cadabra2-link-gmp.patch b/cadabra2-link-gmp.patch new file mode 100644 index 0000000..8084892 --- /dev/null +++ b/cadabra2-link-gmp.patch @@ -0,0 +1,14 @@ +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-link-python.patch b/cadabra2-link-python.patch new file mode 100644 index 0000000..fec8e89 --- /dev/null +++ b/cadabra2-link-python.patch @@ -0,0 +1,27 @@ +Index: cadabra2-2.4.5.6/core/CMakeLists.txt +=================================================================== +--- cadabra2-2.4.5.6.orig/core/CMakeLists.txt ++++ cadabra2-2.4.5.6/core/CMakeLists.txt +@@ -294,7 +294,7 @@ target_link_libraries(cadabra2 PRIVATE + ${GMPXX_LIBRARIES} + ${GMP_LIBRARIES} + ${Boost_LIBRARIES} +-# ${PYTHON_LIBRARIES} ++ ${PYTHON_LIBRARIES} + # ${GLIBMM3_LIBRARIES} + ) + +Index: cadabra2-2.4.5.6/core/packages/CMakeLists.txt +=================================================================== +--- cadabra2-2.4.5.6.orig/core/packages/CMakeLists.txt ++++ cadabra2-2.4.5.6/core/packages/CMakeLists.txt +@@ -66,8 +66,7 @@ foreach(PACKAGE ${COMPILED_PACKAGES}) + set_target_properties(${PNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cdb/${PINSTALL}") + set_target_properties(${PNAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cdb/${PINSTALL}") + set_target_properties(${PNAME} PROPERTIES SUFFIX ".${PYTHON_MOD_SUFFIX}") +- +- target_link_libraries(${PNAME} PUBLIC cadabra2 ${GMPXX_LIBRARIES}) ++ target_link_libraries(${PNAME} PUBLIC cadabra2 ${PYTHON_LIBRARIES} ${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 new file mode 100644 index 0000000..b90ebf5 --- /dev/null +++ b/cadabra2-use-system-pybind11.patch @@ -0,0 +1,20 @@ +--- + 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 new file mode 100644 index 0000000..746b9de --- /dev/null +++ b/cadabra2.changes @@ -0,0 +1,527 @@ +------------------------------------------------------------------- +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.4: + * Fix simplification of pow nodes. + * Make ExNode iterators skip nodes hidden by zoom. + * Fix canonicalise acting on expressions with + self-anticommuting objects and derivatives. + * Fix crash when comparing with empty expressions. + * Make zoom accept a list of patterns. + * Fix bugs in getting Weight values from Python, and setting + multipliers in Python. + * Add LaTeXString object to display LaTeX formatted strings on + capable frontends. + * Fix a bug with canonicalise acting on vector-spinor objects. + * Enable the use of Unicode greek characters as input (which + will get converted to LaTeX automatically) to enable + cut-n-paste in the terminal. + * Fix handling of multi-line expressions (newlines now count as + a whitespace). + * Fix canonicalise to allow for factors which are sums, as long + as these do not have indices. + * Ability to use builtin MicroTeX for typesetting (the default + in 2.5.x), which removes the requirement to have a LaTeX + installation. + * Experimental AppImages now available for Linux on both x86-64 + and aarch64 architectures. + * Removed deprecated GTK-3 features and cleaned up the UI. + * Fix bug in code to interrupt a running computation. + * Added dynamical cell updates, e.g. to create animations. +- Add _service file to fetch sources from git to allow submodules + to be included in tarball. +- Add patches to fix build: + * cadabra2-cmake-correct-python-variable.patch: Use correct + variable from FindPython, i.e. Python_EXECUTABLE, not + PYTHON_EXECUTABLE (gh#kpeeters/cadabra2#309). + * cadabra2-use-system-pybind11.patch: Allow use of system + pybind11 (gh#kpeeters/cadabra2#310). + * cadabra2-link-gmp.patch: Explicitly link to gmp library. +- Drop cadabra2-link-python.patch: upstreamed. +- Drop use of %suse_update_desktop_file: no longer needed. +- Drop appdata file included as Source1, bundled files are now + installed correctly. +- Use python-rpm-macros and setup to build with newer pythons on + Leap 15.X (does not yet work due to unavailability of + python311-sympy and python311-ipykernel on these distros). + +------------------------------------------------------------------- +Thu Apr 18 19:37:14 UTC 2024 - Atri Bhattacharya + +- Update to version 2.4.5.6: + * Allow setting PYTHON_SITE_PATH manually. + +------------------------------------------------------------------- +Thu Jan 25 18:20:58 UTC 2024 - Atri Bhattacharya + +- Update to version 2.4.5.4: + * Improvements to the zoom algorithm. + * Bug fixes. +- Require python3 >= 3.8. + +------------------------------------------------------------------- +Sun Sep 17 10:51:15 UTC 2023 - Atri Bhattacharya + +- Make examples and doc packages noarch. + +------------------------------------------------------------------- +Sun Sep 10 21:57:56 UTC 2023 - Atri Bhattacharya + +- Update to version 2.4.4.1: + * Update to fix issues with pybind11 and to avoid cmake + warnings. +- Drop testing on 32-bit systems due to tolerance errors in a + test (gh#kpeeters/cadabra2#280). + +------------------------------------------------------------------- +Wed Dec 7 08:00:00 UTC 2022 - Atri Bhattacharya + +- Update to version 2.4.3.2: + * Add missing canonicalisation of rationals when simplifying + powers. + +------------------------------------------------------------------- +Tue Dec 6 12:54:33 UTC 2022 - Atri Bhattacharya + +- Update to version 2.4.2.4: + * Minor update to fix issues with Python 3.11. +- Changes from version 2.4.2.0: + * Added package cdb.graphics.plot for easy plotting. + * Added package cdb.sympy.calculus for use of SymPy calculus + functions on Cadabra expressions. + * Expanded nevaluate to numerically evaluate more expressions. + * Various small bug fixes and enhancements. +- For %check, set working dir as HOME to allow tests that try to + write config files to home dir to work without perm issues. + +------------------------------------------------------------------- +Sun Oct 9 16:35:12 UTC 2022 - Atri Bhattacharya + +- Update to version 2.4.0.2: + * Release to accompany the "meld" paper. + +------------------------------------------------------------------- +Mon Jul 4 14:23:29 UTC 2022 - Atri Bhattacharya + +- Update to version 2.3.9.3 + * Several fixes to meld (Dominic). + * Make typesetting run in a separate thread to prevent the UI + from feeling sluggish. + * Some changes in the behaviour of list addition/multiplication, + to match Mathematica's behaviour. + * New nevaluate algorithm for fast numerical evaluation of + expressions (work-in-progress). + * Fix for Python 3.10.x. + * Fix for automatic cleanup of Diagonal objects. + * Fix crash with tab-completion. +- Changes from version 2.3.8: + * Option to display negative powers as fractions (Dominic). + * New algorithm slot_asym to (anti-)symmetrise objects in + indices by giving index positions instead of names. + * New functionality to implement algorithms in Python (Dominic). + * Faster re-implementation of get_component using new C++ + function modules (Dominic). + * New cdb.numeric.evaluate and cdb.numeric.integrate modules to + evaluate expressions numerically or integrate differential + equations numerically (Dominic). + * Updates to cdb.utils.indices and cdb.core.manip. + * Add warnings functionality to the kernel (Dominic). + * Add infrastructure to let algorithms display progress + information while running (Dominic). + * Add cell cursor position to status bar (Dominic). + * Fix bug in expand_delta when the delta occurs at top-level in + an expression. + * Many meld fixes and improvements (Dominic). + * Fix handling of auto-declare names (names with a '#' + character). + * Keep LaTeX log/aux files on error to aid debugging. + * Fix LaTeX code to avoid some global variable name clashes. + * Fix for compilation on Apple silicon. +- Add cadabra2-link-python.patch: Link against python shared lib + where necessary to avoid linking failures. + +------------------------------------------------------------------- +Sun Feb 14 01:09:07 UTC 2021 - Atri Bhattacharya + +- Update to version 2.3.6.8: + * Add forgotten file to sources. +- Changes from version 2.3.6.4 and 2.3.6.6: + * Do not remove latex log/aux files on error. + * Fix glib linker error for cadabra-cli + * Fix meld error where terms with different names but same index + structure were melded. + * Add more functionality to cdb.core.node. + * Fix handling of auto-declare names ('A#'); these were not + matched correctly to numbered names ('A18'). + * Fix vcpkg changing 'libintl' to 'intl'. + * Optimise AdjformEx to use int32_t instead of mpq_class. + * Handle Diagonal objects with symbolic (as opposed to numeric) + indices. + * Remove old-style gauge theory package. + * Disable mathematica support by default. +- Require jupyter-jupyter_core-filesystem for openSUSE >= 1550 for + the appropriate rpm macros. + +------------------------------------------------------------------- +Tue Jan 5 18:54:07 UTC 2021 - Atri Bhattacharya + +- Update to version 2.3.6.2: + * Fix a linker error for the xeus jupyter kernel. + +------------------------------------------------------------------- +Thu Dec 31 15:34:53 UTC 2020 - Atri Bhattacharya + +- Update to version 2.3.6.1: + * Once further change to the installation path of cadabra2.so + module, to conform to Debian policies. + * Fix display of lists containing Ex objects. + * Fix import of Jupyter notebooks. + * Fix bug related to automatic dummy index relabelling. + * Fix tab-completion. +- Exclude tests that try to write config files to home dir; since + the `%ctest` macro does not accept additional options, run ctest + manually. + +------------------------------------------------------------------- +Tue Nov 17 13:09:12 UTC 2020 - Atri Bhattacharya + +- Update to version 2.3.5: + * Relocate cadabra module to python_sitelib instead of + python_sitearch. +- Add cadabra2-disable-components-test.patch: Disable a test that + crashes in the buildroot env -- but not in a user session -- for + unknown reasons (gh#kpeeters/cadabra2#212). +- Enable tests since gh#kpeeters/cadabra2#211 is now resolved. +- Add python3 to Requires for cadabra2. + +------------------------------------------------------------------- +Sun Nov 1 09:55:08 UTC 2020 - Atri Bhattacharya + +- Update to version 2.3.2: + * Fixed bug in pattern matching logic used in + integrate_by_parts. + * Fixed bug which would prevent assignment to node multiplier + from Python. + * Tab-completion on command line and in the notebook. + * Install the cadabra2 python module in a standard location. + * Fixes for the Mathematica scalar backend. + * Make expand_delta much faster when the Kronecker delta is + contracted with objects which have anti-symmetry. + * Make meld work correctly with non/anti-commuting objects. + * Make numbered indices like a1 display with a subscript + automatically a1. + * Provide pickle functionality for expressions. + * Fixes for compatibility with newer SymPy versions. + * Added a 'find' function in the notebook, to search input + cells. + * New Jupyter kernel (enabled by default) which does not require + Xeus. + * Various improvements and fixed for handling and display of + Young tableaux. + * Added ExNode::ex() to obtain an Ex object from an ExNode + iterator. +- Drop patches incorporated upstream: + * cadabra2-python-modules-location.patch. + * Fix-linking-of-cadabra-module.patch. +- Split out a separate package - jupyter-cadabra2-kernel - for the + new jupyter notebook kernel. +- Fix typo in `ENABLE_SYSTEM_JSONCPP` option passed to `%cmake`. +- Set up but disable building and running tests until issues with + the test-suite are sorted out [gh#kpeeters/cadabra2#211, + gh#kpeeters/cadabra2#212]. + +------------------------------------------------------------------- +Fri Aug 28 20:52:48 UTC 2020 - Atri Bhattacharya + +- Refresh Fix-linking-of-cadabra-module.patch with fix for same + issue committed upstream [gh#kpeeters/cadabra2#202]. + +------------------------------------------------------------------- +Thu Jul 9 22:19:27 UTC 2020 - Atri Bhattacharya + +- Update to version 2.3.0: + * Fix bug which would collect powers of objects with indices and + then report an error. + * Functionality to read Cadabra Cloud notebooks into the desktop + Cadabra. + * Use a better hash function for expression trees (avoiding a + bug in factor_in). + * Expose index symmetries through traces, so that canonicalise + and related algorithms work correctly. Introduced a new + property TableauInherit. + * More flexible LaTeXForm property, to enable more flexible + object display in the notebook. + * Various fixes for behaviour of unwrap with anti- or + non-commuting arguments. + * New meld algorithm for canonicalisation. +- Drop cadabra2-add-pthread-to-cxxflags.patch: No longer required + for building. +- Add cadabra2-python-modules-location.patch to fix location of + python libs and modules (gh#kpeeters/cadabra2#203). +- Rebase Fix-linking-of-cadabra-module.patch for update; only + partially fixed by upstream (gh#kpeeters/cadabra2#202). +- Remove a hashbang from a non-executable script. +- Use %{name}-%{version} naming format for source. + +------------------------------------------------------------------- +Sat Jan 4 01:21:06 UTC 2020 - Stefan BrĂ¼ns + +- Update to version 2.2.8: + * More versatile handling of Trace, including sorting using + cyclic symmetry (Connor). + * Fixes for combine (Connor). + * Save command-line history (Connor). + * Make imported notebooks use the default post_process function. + * Make unwrap move scalars out of exterior (wedge) products, see + this Q&A post. + * Fix bug with indices with accents (github/166). + * Added a cadabra2latex command to convert notebooks to LaTeX. + * Fixed issue building with latest Homebrew on macOS. + * Fixed Windows build issues and add python path settings at + runtime. + * Fixed bug with multipliers not reducing to canonical form. +- Add Fix-linking-of-cadabra-module.patch +- Remove timestamps from Doxygen generated HTML files, drop + obsolete cadabra2-rpmlintrc +- Use system jsoncpp +- Drop conditionals for obsolete distro versions +- Remove lots of unused/obsolete TeX BuildRequires. + +------------------------------------------------------------------- +Tue Jun 25 09:24:38 UTC 2019 - Atri Bhattacharya + +- Update to version 2.2.7: + * Added cdb.utils.develop and cdb.relativity.abstract. + * Added authentication token to all client-server communication. + * Various extensions to the Trace property. + * Make property info available from Python (Dominic). + * Fixed integration by parts with index-less derivatives. + * Added eliminate_vielbein. + * Fixed display of lists of sympy expressions. + * Fixed (finally) UTF8 input for non-English symbols. + +- Update to 2.2.6 + * Experimental notebook diff viewer (Dominic). + * Warn when about to overwrite an existing notebook. + * Improvements for HiDPI screens especially on macOS. + * Fix crash in sym/asym. + * Fix undo/redo crash in notebook when deleting cells. + * Improvements to the cdb.core.manip package (Dominic). + * Fix in young_project_tensor. + * Fix pattern matching for anti-commuting factors. + * Added explicit_indices to convert expressions with + implicit indices to their explicit form. + * Add option to build a Jupyter kernel. + * Fix bug in split_index (acted on wrong parts of expressions). + * Fix bug with substitute not checking constraints for + single-factor patterns. + * Add partial option to substitute to require that products or sums + match all terms, not just a partial sum or partial product. + +- Refresh cadabra2-add-pthread-to-cxxflags.patch for version + update, no effective changes. + +------------------------------------------------------------------- +Fri Mar 15 14:17:41 UTC 2019 - Atri B + +- Update to version 2.2.5: + * Interim bug fix release with fixes for upcoming Debian as well + as the new explicit_indices algorithm. +- Move man files to the correct _mandir. +- Minor cleanups using spec-cleaner. + +------------------------------------------------------------------- +Fri Jan 25 08:44:42 UTC 2019 - badshah400@gmail.com + +- Update to version 2.2.4: + * Minor bug fixes. +- Rebase cadabra2-add-pthread-to-cxxflags.patch for minor changes + to source CMakeLists.txt file. +- Use make doc instead of running doxygen directly. +- Drop commented out commands to generate PDF documentation. + +------------------------------------------------------------------- +Mon Apr 30 07:11:16 UTC 2018 - guillaume.gardet@opensuse.org + +- Disable explicitly mathematica option (fix archs not supported by + Mathematica, such as AArch64) + +------------------------------------------------------------------- +Mon Apr 9 01:46:11 UTC 2018 - badshah400@gmail.com + +- BuildRequires: libboost_date_time-devel instead of + BuildRequires: libboost_date_time1_66_0-devel, and only for + openSUSE > 1320; boost-devel in its entirety is already required + for older versions. +- gcc-c++ >= 4.9 now required. + +------------------------------------------------------------------- +Fri Mar 30 10:21:17 UTC 2018 - badshah400@gmail.com + +- Update to version 2.2.0: + * Experimental support for modifying the expression tree + directly from Python (see e.g. Fourier transforms). + * Fix for integration by parts (gh#kpeeters/cadabra2#71) + * Fix for incorrect conversion to sympy expressions. + * Optionally build with support for Mathematica scalar backend; + see map_mma. + * Many bugfixes for expression display and sympy conversion. + * Now using pybind instead of boost.python, in preparation for + * Windows port, and to enable building against Anaconda. + * Copy/paste of output cells added. + * New simplify command, which simplifies the scalar parts of + expressions, and can be switched to use either Sympy or + Mathematica. + * Fix to treat derivatives with respect to explicit coordinates + as scalars in evaluate; see this Q&A post. + * Fix for failure to flag errors for WeightInherit property. + * Fixed: vary on single-term expressions + * (gh#kpeeters/cadabra2#57) + * Fixed: evaluate with dense factors and no 'values' property on + indices (gh#kpeeters/cadabra2#68) +- Rename and rebase cadabra2-2.1.7.patch to + cadabra2-add-pthread-to-cxxflags.patch. +- Add BuildRequires: libboost_date_time1_66_0-devel, new + dependency with version 2.2.0. +- All python bindings are now required to be installed in + _datadir. +- New binary cadabra2cadabra. + +------------------------------------------------------------------- +Fri Feb 2 21:21:57 UTC 2018 - stefan.bruens@rwth-aachen.de + +- Add a memory _constraints, builds fail with less than 4 GByte + +------------------------------------------------------------------- +Sat Jan 27 22:08:29 UTC 2018 - badshah400@gmail.com + +- Disable building LaTeX-based PDF documentation until build + failures are fixed. +- For the -gui package use post(un) scriptlets only for openSUSE + <= 1320; for newer openSUSE, these are handled by rpm triggers + automatically. + +------------------------------------------------------------------- +Fri Dec 29 08:33:37 UTC 2017 - kkaempf@suse.com + +- fix build, add -pthread to CMAKE_CXX_FLAGS + added cadabra2-2.1.7.patch + +------------------------------------------------------------------- +Wed Nov 22 09:19:49 UTC 2017 - badshah400@gmail.com + +- Update to version 2.1.7: + * Another interim release to fix bugs and sort out the build + process on new distros. + +------------------------------------------------------------------- +Thu Nov 2 09:19:33 UTC 2017 - badshah400@gmail.com + +- Update to version 2.1.5: + * Interim release to get a number of bug fixes out to everyone, + and to use as basis for binary packages for several new + distributions. +- Drop cadabra2-cmake-error.patch; fixed upstream. +- Fix Group for cadabra2-doc-pdf: Documentation/PDF doesn't exist, + use Documentation/Other +- Change hashbang "/usr/bin/env python3" to "/usr/bn/python3". + +------------------------------------------------------------------- +Wed Oct 11 12:04:47 UTC 2017 - badshah400@gmail.com + +- Refresh source tarball from upstream: upstream might have pushed + out a new tarball without changes to the versioning, making the + source validator service complain about the mismatch. + +------------------------------------------------------------------- +Sun Aug 6 18:20:17 UTC 2017 - badshah400@gmail.com + +- Update to version 2.1.5: + * Interim release with as its main feature the map_sympy command + which makes it much easier to apply sympy algorithms to + component expressions. +- Drop cadabra2-include-functional-header.patch; fixed upstream. + +------------------------------------------------------------------- +Thu Jul 20 22:52:55 UTC 2017 - badshah400@gmail.com + +- Add an appdata file and install it to /usr/share/metainfo; + BuildRequires on appstream-glib added. + +------------------------------------------------------------------- +Sun Jun 25 11:26:09 UTC 2017 - badshah400@gmail.com + +- Add cadabra2-include-functional-header.patch: Explicitly include + the header in core/Functional.hh to fix building on + openSUSE > 1320; apply without conditionals as it doesn't hurt + to have this generally. + +------------------------------------------------------------------- +Sun Apr 23 12:14:41 UTC 2017 - badshah400@gmail.com + +- BuildRequires: texlive-epstopdf instead of texlive-epstopdf-bin + to fix build failures on Leap 42.1. + +------------------------------------------------------------------- +Sun Apr 23 07:24:59 UTC 2017 - badshah400@gmail.com + +- Update to version 2.1.4: + * Enable packages to be written using Cadabra notation, instead + of only pure Python (still experimental). + * Young tableaux properties Tableau and FilledTableau the + related algorithm lr_tensor are available again. + * Sorting Majorana spinors possible again using sort_spinors. + * Extended rename_dummies with capability to rename indices to + different set. + * Make vary work on powers of expressions with dummy indices. + * Substitution of sub-sums now available (e.g. substitute of + A+B=C in ex:=A+B+C+D). + * Improved LaTeX export to make printed notebooks look much + better. + * Many improvements to the component engine, in particular for + handling of derivatives and fractions involving tensors. + * Better line spacing for line-wrapped equations. + * Smarter scroll-to-cell behaviour of the notebook. + * Canonicalising expressions with component values for indices + now works again. + * The unwrap algorithm can now be guided about what to unwrap, + and also knows about spinors and Dirac bars. + * Experimental support to use Cadabra directly from C++ code, as + a library (see the c++lib directory). + * Fixes for using a custom post_process defined as a function + nested inside another. + * Rudimentary timing logic, try server.totals(); + * Fixed: pasting text in the notebook sometimes double-pastes. + * Fixed: split_index does not work properly on left- and + right-hand side of equations. + * Fixed: sort_product does not always sort expressions. + * Fixed: eliminate_metric only acts at top level of an + expression, should have deep=True by default. + * Fixed: a bug which would lead to a segfault when using + deep=True. +- Rebase cadabra2-cmake-error.patch for version update. +- Add %{name}-rpmlintrc file to suppress warnings about the + presence of "__DATE__" and/or "__TIME__" in generated html files + for documentation (%{name}-doc). + +------------------------------------------------------------------- +Tue Jan 17 09:09:44 UTC 2017 - badshah400@gmail.com + +- Initial package. +- Add cadabra2-cmake-error.patch to make sure CMakeLists.txt + invokes "execute_process" instead of "execute"; fixes build + failures. + diff --git a/cadabra2.obsinfo b/cadabra2.obsinfo new file mode 100644 index 0000000..35d2ab8 --- /dev/null +++ b/cadabra2.obsinfo @@ -0,0 +1,4 @@ +name: cadabra2 +version: 2.5.6 +mtime: 1727641956 +commit: a60a615f8addb44edb2cf97a146bda662b4eef48 diff --git a/cadabra2.spec b/cadabra2.spec new file mode 100644 index 0000000..61f35c5 --- /dev/null +++ b/cadabra2.spec @@ -0,0 +1,235 @@ +# +# spec file for package cadabra2 +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +# Disable testing for 32-bit due to invalid free issue in test canonicalise: https://github.com/kpeeters/cadabra2/issues/280 +%ifarch %ix86 +%bcond_with tests +%else +%bcond_without tests +%endif +%{?sle15_python_module_pythons} +%if 0%{?suse_version} > 1650 +%global pythons python3 +%endif +Name: cadabra2 +Version: 2.5.6 +Release: 0 +Summary: A computer algebra system for solving problems in field theory +License: GPL-3.0-or-later +Group: Productivity/Scientific/Math +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-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} +BuildRequires: %{python_module matplotlib} +BuildRequires: %{python_module pybind11-devel} +BuildRequires: %{python_module sympy} +BuildRequires: appstream-glib +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: gcc-c++ >= 4.9 +BuildRequires: gmp-devel +BuildRequires: hicolor-icon-theme +BuildRequires: libboost_date_time-devel +BuildRequires: libboost_filesystem-devel +BuildRequires: libboost_headers-devel +BuildRequires: libboost_program_options-devel +BuildRequires: libboost_python3-devel +BuildRequires: libboost_regex-devel +BuildRequires: libboost_system-devel +BuildRequires: libuuid-devel +BuildRequires: pcre-devel +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: update-desktop-files +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(gtkmm-3.0) +BuildRequires: pkgconfig(jsoncpp) +BuildRequires: pkgconfig(sqlite3) +Requires: python3 >= 3.8 +Recommends: %{name}-doc +%if 0%{?suse_version} >= 1550 +BuildRequires: jupyter-jupyter_core-filesystem +%endif +# SECTION For test +%if %{with tests} +BuildRequires: %{python_module gmpy2} +%endif +# /SECTION +Recommends: %{name}-examples + +%description +Cadabra2 is a computer algebra system (CAS) designed specifically for +the solution of problems encountered in field theory. It has extensive +functionality for tensor computer algebra, tensor polynomial +simplification including multi-term symmetries, fermions and +anti-commuting variables, Clifford algebras and Fierz transformations, +implicit coordinate dependence, multiple index types and many more. +The input format is a subset of TeX. Both a command-line and a +graphical interface are available. + +Key features of Cadabra2: +- Input and output using TeX notation. +- Designed for field-theory problems, with handling of anti-commuting + and non-commuting objects without special notations for their + products, gamma matrix algebra, Fierz identities, Dirac conjugation, + vielbeine, flat and curved, covariant and contravariant indices, + implicit dependence of tensors on coordinates, partial and covariant + derivatives... +- Powerful tensor simplification algorithms, not just for mono-term + symmetries but also for multi-terms symmetries like the Bianchi + identity, or dimensionally-dependent symmetries like the Schouten + identity. + +%package gui +Summary: GUI for cadabra2: computer algebra system for problems in field theory +Group: Productivity/Scientific/Math +Requires: %{name} = %{version} +Obsoletes: cadabra < 2.0 +Provides: cadabra = %{version} + +%description gui +Cadabra2 is a computer algebra system (CAS) designed specifically for +the solution of problems encountered in field theory. + +This package provides the GUI for %{name} and it's desktop menu integration. + +%package examples +Summary: A computer algebra system for solving problems in field theory +Group: Productivity/Scientific/Math +Requires: %{name} = %{version} +BuildArch: noarch + +%description examples +Cadabra2 is a computer algebra system (CAS) designed specifically for +the solution of problems encountered in field theory. + +This package provides examples for %{name}. + +%package doc +Summary: A computer algebra system for solving problems in field theory +Group: Documentation/HTML +Obsoletes: cadabra-doc < 2.0 +Provides: cadabra-doc = %{version} +BuildArch: noarch + +%description doc +Cadabra2 is a computer algebra system (CAS) designed specifically for +the solution of problems encountered in field theory. + +This package provides html documentation for %{name}. + +%package -n jupyter-cadabra2-kernel +Summary: Jupyter kernel for cadabra2 +Group: Productivity/Scientific/Math +Requires: %{name} = %{version} +Requires: jupyter-notebook + +%description -n jupyter-cadabra2-kernel +Cadabra2 is a computer algebra system (CAS) designed specifically for +the solution of problems encountered in field theory. + +This package provides a jupyter kernel for %{name}. + +%prep +%autosetup -p1 +rm examples/.gitignore +# Remove timestamps from Doxygen HTML files +echo "HTML_TIMESTAMP = NO" >> config/Doxyfile +# REMOVE HASHBANG FROM NON-EXEC SCRIPT +sed -i "1{/#!\/usr\/bin\/env python/d}" libs/appdirs/cdb_appdirs.py + +%build +%{python_expand # +%cmake \ + -DCMAKE_MANDIR:PATH=%{_mandir} \ + -DINSTALL_LATEX_DIR:PATH=%{_datadir}/texmf \ + -DENABLE_FRONTEND:BOOL=ON \ + -DENABLE_SYSTEM_JSONCPP:BOOL=ON \ + -DENABLE_MATHEMATICA:BOOL=OFF \ + -DBUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \ + -DPython_EXECUTABLE=%{_bindir}/$python \ + %{nil} +} + +%cmake_build +cd .. +%make_build doc + +%install +%cmake_install + +mkdir -p %{buildroot}%{_datadir}/texmf/tex/latex/cadabra2/ +ln %{buildroot}%{_datadir}/cadabra2/latex/* %{buildroot}%{_datadir}/texmf/tex/latex/cadabra2/ + +%if %{with tests} +%check +export PATH=${PATH}:%{buildroot}%{_bindir} +export PYTHONDONTWRITEBYTECODE=1 +# Set HOME to current dir to allow tests that try to +# write config files to home dir to run without perm issues +export HOME=`pwd` +%ctest +%endif + +%files +%doc README.rst +%license doc/license.txt +%{_bindir}/cadabra2cadabra +%{_bindir}/cadabra2latex +%{_bindir}/cadabra-server +%{_bindir}/cdb-nbtool +%{_bindir}/%{name} +%{_bindir}/%{name}-cli +%{_bindir}/%{name}ipynb +%{_bindir}/%{name}python +%{_bindir}/%{name}html +%{_datadir}/%{name}/ +%{_datadir}/texmf +%{python3_sitearch}/cadabra2*.so +%{python3_sitearch}/cadabra2_defaults.py +%{python3_sitearch}/cdb_appdirs.py +%{python3_sitearch}/cdb/ +%{_mandir}/man1/cadabra*.1%{?ext_man} + +%files gui +%license doc/license.txt +%{_bindir}/%{name}-gtk +%{_datadir}/icons/hicolor/*/apps/cadabra2-gtk.* +%{_datadir}/applications/*.cadabra2-gtk.desktop +%dir %{_datadir}/metainfo +%{_datadir}/metainfo/*.appdata.xml + +%files -n jupyter-cadabra2-kernel +%license doc/license.txt +%{python3_sitearch}/cadabra2_jupyter/ +%{python3_sitearch}/notebook/ +%{_jupyter_kernel_dir}/cadabra2/ + +%files examples +%doc examples/ + +%files doc +%doc doxygen/html + +%changelog