Compare commits

14 Commits

Author SHA256 Message Date
c6f0cb7dfa Accepting request 1298608 from science
OBS-URL: https://build.opensuse.org/request/show/1298608
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cadabra2?expand=0&rev=32
2025-08-10 20:20:47 +00:00
7c4e640525 Accepting request 1297515 from home:badshah400:branches:science
Update to version 2.5.14.

OBS-URL: https://build.opensuse.org/request/show/1297515
OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=72
2025-08-09 16:03:39 +00:00
4ebf3e2929 Accepting request 1276873 from science
OBS-URL: https://build.opensuse.org/request/show/1276873
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cadabra2?expand=0&rev=31
2025-05-12 18:19:35 +00:00
19673719bc Accepting request 1275943 from home:badshah400:branches:science
* Update to version 2.5.12.
* Drop MicroTeX as additional source since git submodule is now correctly used by upstream.
* Fix build for Leap 16.0.

OBS-URL: https://build.opensuse.org/request/show/1275943
OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=70
2025-05-12 14:17:43 +00:00
320c00463b Accepting request 1256122 from science
OBS-URL: https://build.opensuse.org/request/show/1256122
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cadabra2?expand=0&rev=30
2025-03-26 20:20:33 +00:00
de2663f94e Accepting request 1256121 from home:badshah400:branches:science
- Drop no longer needed pcre-devel dependency.

OBS-URL: https://build.opensuse.org/request/show/1256121
OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=68
2025-03-26 07:25:26 +00:00
db5c0c9ee9 Accepting request 1250649 from science
OBS-URL: https://build.opensuse.org/request/show/1250649
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cadabra2?expand=0&rev=29
2025-03-07 15:40:02 +00:00
cfd23d1c25 Accepting request 1249661 from home:badshah400:branches:science
* Update to version 2.5.10.
* New BuildRequires: pkgconfig(openssl)
* Add MicroTeX as separate tarball: this is missed by upstream git as a submodule, so obs_scm _service's `enable_submodules` is unable to include it either.
* Drop cadabra2-default-python-path.patch: no longer needed after changes to upstream logic for finding python.

OBS-URL: https://build.opensuse.org/request/show/1249661
OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=66
2025-03-06 14:02:56 +00:00
d2eb28d644 Accepting request 1218215 from science
OBS-URL: https://build.opensuse.org/request/show/1218215
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cadabra2?expand=0&rev=28
2024-10-27 10:24:25 +00:00
b790917481 Accepting request 1218213 from home:badshah400:branches:science
Update to version 2.5.8

OBS-URL: https://build.opensuse.org/request/show/1218213
OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=64
2024-10-25 10:04:48 +00:00
8ea0228e07 Accepting request 1206202 from science
OBS-URL: https://build.opensuse.org/request/show/1206202
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cadabra2?expand=0&rev=27
2024-10-08 15:24:40 +00:00
350b4b5dfe Accepting request 1206178 from home:badshah400:branches:science
* 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/request/show/1206178
OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=62
2024-10-08 05:33:25 +00:00
2c82e117ca Accepting request 1194403 from science
OBS-URL: https://build.opensuse.org/request/show/1194403
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cadabra2?expand=0&rev=26
2024-08-17 10:44:22 +00:00
3da44115e1 Accepting request 1193643 from home:badshah400:branches:science
* Update to version 2.5.2.
* 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, cadabra2-use-system-pybind11.patch, cadabra2-link-gmp.patch.
* 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).

OBS-URL: https://build.opensuse.org/request/show/1193643
OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=60
2024-08-17 05:14:25 +00:00
9 changed files with 248 additions and 90 deletions

17
_service Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/kpeeters/cadabra2.git</param>
<param name="scm">git</param>
<param name="revision">2.5.14</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="filename">cadabra2</param>
<param name="submodules">enable</param>
</service> <service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="buildtime"/>
</services>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9a3ebe3debd6efdd5f20a3c78acc2ef8933135d5f43da39b6ea107be94a9413c
size 26827151

3
cadabra2-2.5.14.obscpio Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:37394b87204b6823aefa9f877ebfa23fcdb12ae529e8351bd94040ffbf5aee49
size 90302478

View File

@@ -1,8 +1,8 @@
Index: cadabra2-2.3.9.3/tests/CMakeLists.txt
Index: cadabra2-2.5.14/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
--- cadabra2-2.5.14.orig/tests/CMakeLists.txt
+++ cadabra2-2.5.14/tests/CMakeLists.txt
@@ -71,7 +71,6 @@ set(RTESTS
trigonometric
noncovariant
algebra

View File

@@ -1,27 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<component>
<id>cadabra2-gtk.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<name>Cadabra 2</name>
<project_license>GPL-3.0+</project_license>
<summary>A computer algebra system for problems in field theory</summary>
<url type="homepage">http://cadabra.science/</url>
<description>
<p>Cadabra2 is a computer algebra system (CAS) designed specifically for
the solution of problems encountered in field theory.</p>
<p>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.</p>
</description>
<screenshots>
<screenshot type="default">
<image height="1440" width="1192">https://cadabra.science/static/images/screenshot.png</image>
<caption>Gamma matrix algebra in a Cadabra2 notebook</caption>
</screenshot>
</screenshots>
<update_contact>info@cadabra.science</update_contact>
</component>

View File

@@ -1,27 +0,0 @@
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)

View File

@@ -1,3 +1,184 @@
-------------------------------------------------------------------
Mon Aug 4 13:24:15 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 2.5.14:
* TeXmacs is supported again, including plotting (put the
config/init-cadabra2.scm file in the appropriate location).
* Plotting is now supported again by the Jupyter kernel.
* Support for plotting in Kitty and iTerm2 terminals.
* Group equal components when displaying component values of
tensors.
* Internal: some operations now use multiple threads (work in
progress).
* Internal: use a pool allocator for tree nodes.
* Internal: speedup in handling of Multiplier (test suite
speedup by 1.5x).
* Docs: add SympyBridge docs.
* Fix bug when subtracting two component expressions.
* Fix bug with NTensor broadcasting from scalar.
* Fix cadabra2-cli argument handling.
* Fix handling of code blocks in cadabra2-cli, making it
consistent with the notebook.
* Stability improvement to the SymPy bridge by walking the SymPy
AST directly instead of parsing printed output.
* Made \iu the imaginary unit, by default displaying as i .
* Fix loading cadabra2_defaults.py in the Jupyter kernel.
* Fix scrolling bug in notebook which would make the document
jump around for no good reason.
* Internal: refactor to enable cleaner insertion of related
properties on property declaration.
* Fix handling substitute with regex (gh#kpeeters/cadabra2#230).
-------------------------------------------------------------------
Fri May 9 02:49:50 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 2.5.12:
* Make evaluate handle expressions in which indices have been
fixed to integers explicitly (e.g. an epsilon tensor with one
index fixed to a number).
* New functionality to update and re-run cells based on the
value of a slider, to enable e.g. interactive plots.
* Initial support for numerical solving of ODEs.
* Bug fixes for nevaluate.
* Enable evaluate to figure out index ranges from Integer
properties.
* Avoid multiple identically-named notebook files used in import
mapping to the same converted .py file.
* Various fixes for hDPI displays to make plots and icons sharp
and decorations render at the correct size.
* Scrolling notebook to cell is now smooth.
* (Internal) Remove all dependence on deprecated gtkmm-3.0
features, in preparation of making the notebook build with
gtkmm-4.0.
* Add option to hide all input cells (for presentation
purposes).
* Add context menu for graphics/plot output to save as SVG.
* Make semicolons more reliably print the expression they
terminate.
* Add nintegrate for numerical integration.
* Make nevaluate handle complex-valued expressions.
* Better handling of floating point numbers. All multipliers are
now either rationals or doubles.
* New nval function to act as a generic frontend for numerical
evaluation of (sub-)expressions (work-in-progress).
* Add safeguards against passing expressions through the SymPy
bridge which SymPy cannot (yet) handle.
* Add functionality to drive the notebook via an external
script.
* Fix export of notebooks to HTML.
- Drop MicroTeX as additional source since git submodule is now
correctly used by upstream.
- Fix build for Leap 16.0.
-------------------------------------------------------------------
Wed Mar 26 07:10:51 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Drop no longer needed pcre-devel dependency.
-------------------------------------------------------------------
Mon Mar 3 09:03:37 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 2.5.10:
* Bugfix for eliminate_kronecker.
* Fix for building Cadabra as a C++ library.
* Various UI and typesetting bug fixes.
* Get rid of websocketpp in favour of boost::beast so we can
build with boost >= 1.87.0.
* Fix for the homebrew package, and option to install the
development branch using homebrew.
* Add caching to the processing of substitution rules (Daniel).
* Fixes for inline execution of Python functions in maths
expressions.
* Do not gobble normal output when an error occurs notebook
execution.
* Fix inconsistent behaviour and crashes with split-view mode.
* Fix display of LaTeXForm properties.
* Documentation updates.
* Close LaTeX input cells on running them (configurable).
* Cleanup and document kernel options.
* Various additions to the plotting package cdb.graphics.plot
including docs.
* Add preliminary support for Plotly as plotting backend.
* Word wrap LaTeX input cells to keep notebooks readable for any
window width.
* Internal changes for python path handling.
- New BuildRequires: pkgconfig(openssl)
- Add MicroTeX as separate tarball: this is missed by upstream git
as a submodule, so obs_scm _service's `enable_submodules` is
unable to include it either.
- Drop cadabra2-default-python-path.patch: no longer needed after
changes to upstream logic for finding python.
- Drop use of deprecated %suse_update_desktop_file.
- Restrict building jupyter kernel to openSUSE >= 1650 to avoid
unresolvables on Leap 15/16.
-------------------------------------------------------------------
Fri Oct 25 09:46:14 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 2.5.8:
* Fix a bug with sympy bridge.
* Fix various issues with the notebook interface.
-------------------------------------------------------------------
Mon Oct 7 19:25:33 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
- 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 <badshah400@gmail.com>
- 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 <badshah400@gmail.com>

4
cadabra2.obsinfo Normal file
View File

@@ -0,0 +1,4 @@
name: cadabra2
version: 2.5.14
mtime: 1753990114
commit: a4ab1c93912f1724f2f3ef26e7deba5a1b694af6

View File

@@ -1,7 +1,7 @@
#
# spec file for package cadabra2
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,24 +16,41 @@
#
# 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} >= 1600
%global pythons python3
%endif
%if 0%{?suse_version} >= 1650
%bcond_without jupyter
%else
%bcond_with jupyter
%endif
Name: cadabra2
Version: 2.4.5.6
Version: 2.5.14
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: https://github.com/kpeeters/cadabra2/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}-gtk.appdata.xml
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-python.patch badshah400@gmail.com -- Link against python shared lib explicitly
Patch1: cadabra2-link-python.patch
BuildRequires: %{python_module devel >= 3.9}
BuildRequires: %{python_module gobject-devel}
BuildRequires: %{python_module matplotlib}
BuildRequires: %{python_module pybind11-devel}
BuildRequires: %{python_module sympy}
BuildRequires: appstream-glib
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: doxygen
BuildRequires: gcc-c++ >= 4.9
BuildRequires: gcc-c++
BuildRequires: gmp-devel
BuildRequires: hicolor-icon-theme
BuildRequires: libboost_date_time-devel
@@ -44,26 +61,22 @@ BuildRequires: libboost_python3-devel
BuildRequires: libboost_regex-devel
BuildRequires: libboost_system-devel
BuildRequires: libuuid-devel
BuildRequires: pcre-devel
BuildRequires: pkgconfig
BuildRequires: python3-devel >= 3.9
BuildRequires: python3-gobject-devel
BuildRequires: python3-ipykernel
BuildRequires: python3-matplotlib
BuildRequires: python3-sympy
BuildRequires: update-desktop-files
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gtkmm-3.0)
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(sqlite3)
Requires: python3 >= 3.8
Recommends: %{name}-doc
%if 0%{?suse_version} >= 1550
%if %{with jupyter}
BuildRequires: %{python_module ipykernel}
BuildRequires: jupyter-jupyter_core-filesystem
%endif
# SECTION For test
%if %{with tests}
BuildRequires: python3-gmpy2
BuildRequires: %{python_module gmpy2}
%endif
# /SECTION
Recommends: %{name}-examples
@@ -143,6 +156,7 @@ 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
@@ -150,13 +164,18 @@ echo "HTML_TIMESTAMP = NO" >> config/Doxyfile
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}
-DBUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
-DPython_EXECUTABLE=%{_bindir}/$python \
-DENABLE_PY_JUPYTER=%{?with_jupyter:ON}%{!?with_jupyter:OFF} \
%{nil}
}
%cmake_build
cd ..
@@ -165,19 +184,9 @@ cd ..
%install
%cmake_install
%suse_update_desktop_file cadabra2-gtk
# INSTALL APPDATA TO /usr/share/metainfo
install -D -m0644 %{S:1} %{buildroot}%{_datadir}/metainfo/%{name}-gtk.appdata.xml
# Replace "/usr/bin/env python3" hashbang by "/usr/bin/python3"
%python3_fix_shebang
mkdir -p %{buildroot}%{_datadir}/texmf/tex/latex/cadabra2/
ln %{buildroot}%{_datadir}/cadabra2/latex/* %{buildroot}%{_datadir}/texmf/tex/latex/cadabra2/
# Disable testing for 32-bit due to tolerance issues https://github.com/kpeeters/cadabra2/issues/280
%ifnarch %ix86
%if %{with tests}
%check
export PATH=${PATH}:%{buildroot}%{_bindir}
@@ -187,7 +196,6 @@ export PYTHONDONTWRITEBYTECODE=1
export HOME=`pwd`
%ctest
%endif
%endif
%files
%doc README.rst
@@ -213,15 +221,17 @@ export HOME=`pwd`
%license doc/license.txt
%{_bindir}/%{name}-gtk
%{_datadir}/icons/hicolor/*/apps/cadabra2-gtk.*
%{_datadir}/applications/cadabra2-gtk.desktop
%{_datadir}/applications/*.cadabra2-gtk.desktop
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/*.appdata.xml
%if %{with jupyter}
%files -n jupyter-cadabra2-kernel
%license doc/license.txt
%{python3_sitearch}/cadabra2_jupyter/
%{python3_sitearch}/notebook/
%{_jupyter_kernel_dir}/cadabra2/
%endif
%files examples
%doc examples/