Compare commits
14 Commits
Author | SHA256 | Date | |
---|---|---|---|
c6f0cb7dfa | |||
7c4e640525 | |||
4ebf3e2929 | |||
19673719bc | |||
320c00463b | |||
de2663f94e | |||
db5c0c9ee9 | |||
cfd23d1c25 | |||
d2eb28d644 | |||
b790917481 | |||
8ea0228e07 | |||
350b4b5dfe | |||
2c82e117ca | |||
3da44115e1 |
17
_service
Normal file
17
_service
Normal 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>
|
||||||
|
|
@@ -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
3
cadabra2-2.5.14.obscpio
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:37394b87204b6823aefa9f877ebfa23fcdb12ae529e8351bd94040ffbf5aee49
|
||||||
|
size 90302478
|
@@ -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.5.14.orig/tests/CMakeLists.txt
|
||||||
+++ cadabra2-2.3.9.3/tests/CMakeLists.txt
|
+++ cadabra2-2.5.14/tests/CMakeLists.txt
|
||||||
@@ -69,7 +69,6 @@ set(RTESTS
|
@@ -71,7 +71,6 @@ set(RTESTS
|
||||||
trigonometric
|
trigonometric
|
||||||
noncovariant
|
noncovariant
|
||||||
algebra
|
algebra
|
||||||
|
@@ -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>
|
|
@@ -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)
|
|
181
cadabra2.changes
181
cadabra2.changes
@@ -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>
|
Thu Apr 18 19:37:14 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
4
cadabra2.obsinfo
Normal file
4
cadabra2.obsinfo
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
name: cadabra2
|
||||||
|
version: 2.5.14
|
||||||
|
mtime: 1753990114
|
||||||
|
commit: a4ab1c93912f1724f2f3ef26e7deba5a1b694af6
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cadabra2
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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
|
%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
|
Name: cadabra2
|
||||||
Version: 2.4.5.6
|
Version: 2.5.14
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A computer algebra system for solving problems in field theory
|
Summary: A computer algebra system for solving problems in field theory
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
Group: Productivity/Scientific/Math
|
Group: Productivity/Scientific/Math
|
||||||
URL: https://cadabra.science/
|
URL: https://cadabra.science/
|
||||||
Source0: https://github.com/kpeeters/cadabra2/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
Source1: %{name}-gtk.appdata.xml
|
|
||||||
# PATCH-FIX-UPSTREAM cadabra2-disable-components-test.patch gh#kpeeters/cadabra2#212 badshah400@gmail.com -- Disable a test that crashes for unknown reasons
|
# 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
|
Patch0: cadabra2-disable-components-test.patch
|
||||||
# PATCH-FIX-UPSTREAM cadabra2-link-python.patch badshah400@gmail.com -- Link against python shared lib explicitly
|
BuildRequires: %{python_module devel >= 3.9}
|
||||||
Patch1: cadabra2-link-python.patch
|
BuildRequires: %{python_module gobject-devel}
|
||||||
|
BuildRequires: %{python_module matplotlib}
|
||||||
|
BuildRequires: %{python_module pybind11-devel}
|
||||||
|
BuildRequires: %{python_module sympy}
|
||||||
BuildRequires: appstream-glib
|
BuildRequires: appstream-glib
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: gcc-c++ >= 4.9
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
BuildRequires: hicolor-icon-theme
|
BuildRequires: hicolor-icon-theme
|
||||||
BuildRequires: libboost_date_time-devel
|
BuildRequires: libboost_date_time-devel
|
||||||
@@ -44,26 +61,22 @@ BuildRequires: libboost_python3-devel
|
|||||||
BuildRequires: libboost_regex-devel
|
BuildRequires: libboost_regex-devel
|
||||||
BuildRequires: libboost_system-devel
|
BuildRequires: libboost_system-devel
|
||||||
BuildRequires: libuuid-devel
|
BuildRequires: libuuid-devel
|
||||||
BuildRequires: pcre-devel
|
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: python3-devel >= 3.9
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-gobject-devel
|
|
||||||
BuildRequires: python3-ipykernel
|
|
||||||
BuildRequires: python3-matplotlib
|
|
||||||
BuildRequires: python3-sympy
|
|
||||||
BuildRequires: update-desktop-files
|
|
||||||
BuildRequires: pkgconfig(gtk+-3.0)
|
BuildRequires: pkgconfig(gtk+-3.0)
|
||||||
BuildRequires: pkgconfig(gtkmm-3.0)
|
BuildRequires: pkgconfig(gtkmm-3.0)
|
||||||
BuildRequires: pkgconfig(jsoncpp)
|
BuildRequires: pkgconfig(jsoncpp)
|
||||||
|
BuildRequires: pkgconfig(openssl)
|
||||||
BuildRequires: pkgconfig(sqlite3)
|
BuildRequires: pkgconfig(sqlite3)
|
||||||
Requires: python3 >= 3.8
|
Requires: python3 >= 3.8
|
||||||
Recommends: %{name}-doc
|
Recommends: %{name}-doc
|
||||||
%if 0%{?suse_version} >= 1550
|
%if %{with jupyter}
|
||||||
|
BuildRequires: %{python_module ipykernel}
|
||||||
BuildRequires: jupyter-jupyter_core-filesystem
|
BuildRequires: jupyter-jupyter_core-filesystem
|
||||||
%endif
|
%endif
|
||||||
# SECTION For test
|
# SECTION For test
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
BuildRequires: python3-gmpy2
|
BuildRequires: %{python_module gmpy2}
|
||||||
%endif
|
%endif
|
||||||
# /SECTION
|
# /SECTION
|
||||||
Recommends: %{name}-examples
|
Recommends: %{name}-examples
|
||||||
@@ -143,6 +156,7 @@ This package provides a jupyter kernel for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
rm examples/.gitignore
|
rm examples/.gitignore
|
||||||
# Remove timestamps from Doxygen HTML files
|
# Remove timestamps from Doxygen HTML files
|
||||||
echo "HTML_TIMESTAMP = NO" >> config/Doxyfile
|
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
|
sed -i "1{/#!\/usr\/bin\/env python/d}" libs/appdirs/cdb_appdirs.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%{python_expand #
|
||||||
%cmake \
|
%cmake \
|
||||||
-DCMAKE_MANDIR:PATH=%{_mandir} \
|
-DCMAKE_MANDIR:PATH=%{_mandir} \
|
||||||
-DINSTALL_LATEX_DIR:PATH=%{_datadir}/texmf \
|
-DINSTALL_LATEX_DIR:PATH=%{_datadir}/texmf \
|
||||||
-DENABLE_FRONTEND:BOOL=ON \
|
-DENABLE_FRONTEND:BOOL=ON \
|
||||||
-DENABLE_SYSTEM_JSONCPP:BOOL=ON \
|
-DENABLE_SYSTEM_JSONCPP:BOOL=ON \
|
||||||
-DENABLE_MATHEMATICA:BOOL=OFF \
|
-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
|
%cmake_build
|
||||||
cd ..
|
cd ..
|
||||||
@@ -165,19 +184,9 @@ cd ..
|
|||||||
%install
|
%install
|
||||||
%cmake_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/
|
mkdir -p %{buildroot}%{_datadir}/texmf/tex/latex/cadabra2/
|
||||||
ln %{buildroot}%{_datadir}/cadabra2/latex/* %{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}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
export PATH=${PATH}:%{buildroot}%{_bindir}
|
export PATH=${PATH}:%{buildroot}%{_bindir}
|
||||||
@@ -187,7 +196,6 @@ export PYTHONDONTWRITEBYTECODE=1
|
|||||||
export HOME=`pwd`
|
export HOME=`pwd`
|
||||||
%ctest
|
%ctest
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
@@ -213,15 +221,17 @@ export HOME=`pwd`
|
|||||||
%license doc/license.txt
|
%license doc/license.txt
|
||||||
%{_bindir}/%{name}-gtk
|
%{_bindir}/%{name}-gtk
|
||||||
%{_datadir}/icons/hicolor/*/apps/cadabra2-gtk.*
|
%{_datadir}/icons/hicolor/*/apps/cadabra2-gtk.*
|
||||||
%{_datadir}/applications/cadabra2-gtk.desktop
|
%{_datadir}/applications/*.cadabra2-gtk.desktop
|
||||||
%dir %{_datadir}/metainfo
|
%dir %{_datadir}/metainfo
|
||||||
%{_datadir}/metainfo/*.appdata.xml
|
%{_datadir}/metainfo/*.appdata.xml
|
||||||
|
|
||||||
|
%if %{with jupyter}
|
||||||
%files -n jupyter-cadabra2-kernel
|
%files -n jupyter-cadabra2-kernel
|
||||||
%license doc/license.txt
|
%license doc/license.txt
|
||||||
%{python3_sitearch}/cadabra2_jupyter/
|
%{python3_sitearch}/cadabra2_jupyter/
|
||||||
%{python3_sitearch}/notebook/
|
%{python3_sitearch}/notebook/
|
||||||
%{_jupyter_kernel_dir}/cadabra2/
|
%{_jupyter_kernel_dir}/cadabra2/
|
||||||
|
%endif
|
||||||
|
|
||||||
%files examples
|
%files examples
|
||||||
%doc examples/
|
%doc examples/
|
||||||
|
Reference in New Issue
Block a user