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
This commit is contained in:
commit
20ab2feec0
2
_service
2
_service
@ -3,7 +3,7 @@
|
|||||||
<service name="obs_scm" mode="manual">
|
<service name="obs_scm" mode="manual">
|
||||||
<param name="url">https://github.com/kpeeters/cadabra2.git</param>
|
<param name="url">https://github.com/kpeeters/cadabra2.git</param>
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="revision">2.5.4</param>
|
<param name="revision">2.5.6</param>
|
||||||
<param name="versionformat">@PARENT_TAG@</param>
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
<param name="filename">cadabra2</param>
|
<param name="filename">cadabra2</param>
|
||||||
<param name="submodules">enable</param>
|
<param name="submodules">enable</param>
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f130d667383d2504e4b36f468684b86f01730a86051d98d65409f0635e35e3ac
|
|
||||||
size 87038478
|
|
3
cadabra2-2.5.6.obscpio
Normal file
3
cadabra2-2.5.6.obscpio
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2b72b5c5f0cbe491c917076d7ec57b28ed721bc4d37958a1ec73c23c23fc9932
|
||||||
|
size 87088654
|
@ -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")
|
|
21
cadabra2-default-python-path.patch
Normal file
21
cadabra2-default-python-path.patch
Normal file
@ -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<std::string>();
|
||||||
|
+ // 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<std::string>() + "/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
|
@ -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)
|
|
||||||
|
|
@ -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)
|
|
@ -1,7 +1,20 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
Mon Aug 12 04:32:18 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
- Update to version 2.5.2:
|
- Update to version 2.5.4:
|
||||||
* Fix simplification of pow nodes.
|
* Fix simplification of pow nodes.
|
||||||
* Make ExNode iterators skip nodes hidden by zoom.
|
* Make ExNode iterators skip nodes hidden by zoom.
|
||||||
* Fix canonicalise acting on expressions with
|
* Fix canonicalise acting on expressions with
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: cadabra2
|
name: cadabra2
|
||||||
version: 2.5.4
|
version: 2.5.6
|
||||||
mtime: 1723292700
|
mtime: 1727641956
|
||||||
commit: 940443b1e78b2b191caa23307c74703202bedf13
|
commit: a60a615f8addb44edb2cf97a146bda662b4eef48
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
%global pythons python3
|
%global pythons python3
|
||||||
%endif
|
%endif
|
||||||
Name: cadabra2
|
Name: cadabra2
|
||||||
Version: 2.5.4
|
Version: 2.5.6
|
||||||
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
|
||||||
@ -36,12 +36,8 @@ URL: https://cadabra.science/
|
|||||||
Source0: %{name}-%{version}.tar.xz
|
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
|
# 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-gmp.patch badshah400@gmail.com -- Link against gmp shared lib explicitly
|
# PATCH-FEATURE-OPENSUSE cadabra2-default-python-path.patch badshah400@gmail.com -- Fix default python path when starting up cadabra2
|
||||||
Patch1: cadabra2-link-gmp.patch
|
Patch1: cadabra2-default-python-path.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
|
|
||||||
BuildRequires: %{python_module devel >= 3.9}
|
BuildRequires: %{python_module devel >= 3.9}
|
||||||
BuildRequires: %{python_module gobject-devel}
|
BuildRequires: %{python_module gobject-devel}
|
||||||
BuildRequires: %{python_module ipykernel}
|
BuildRequires: %{python_module ipykernel}
|
||||||
|
Loading…
Reference in New Issue
Block a user