cadabra2/cadabra2-default-python-path.patch
Atri Bhattacharya 8691ac3335 * 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/package/show/science/cadabra2?expand=0&rev=66
2025-03-06 14:02:56 +00:00

22 lines
1007 B
Diff

---
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