public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ledger] f44: feat: use symlink for python module (fixes rb#2405925, rb#2380701, rh#2405078)
@ 2026-07-16 11:51 Ankur Sinha
0 siblings, 0 replies; only message in thread
From: Ankur Sinha @ 2026-07-16 11:51 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ledger
Branch : f44
Commit : 736980676e6c2db8790b88a6dea7804ff8ce6623
Author : Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
Date : 2026-07-16T11:08:23+00:00
Stats : +34/-2 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/ledger/c/736980676e6c2db8790b88a6dea7804ff8ce6623?branch=f44
Log:
feat: use symlink for python module (fixes rb#2405925, rb#2380701, rh#2405078)
---
diff --git a/0001-disable-cmake-test.patch b/0001-disable-cmake-test.patch
index d234523..46caf58 100644
--- a/0001-disable-cmake-test.patch
+++ b/0001-disable-cmake-test.patch
@@ -1,7 +1,7 @@
From 3c5572df749bcee5ba9a256afe9b6512bc809bca Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
Date: Sat, 21 Feb 2026 13:22:28 +0000
-Subject: [PATCH 1/2] disable cmake test
+Subject: [PATCH 1/3] disable cmake test
gmp.h does not define these parameters in Fedora's install.
They're in gmp-${arch}.h
diff --git a/0002-update-start-method-for-tests.patch b/0002-update-start-method-for-tests.patch
index 6673dd2..ee9632d 100644
--- a/0002-update-start-method-for-tests.patch
+++ b/0002-update-start-method-for-tests.patch
@@ -1,7 +1,7 @@
From 9bc963564697b72c1bfcb8e40eacf644b3814312 Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
Date: Sun, 22 Feb 2026 15:08:21 +0000
-Subject: [PATCH 2/2] update start method for tests
+Subject: [PATCH 2/3] update start method for tests
---
test/RegressTests.py | 2 ++
diff --git a/0003-create-symlink-for-python-module.patch b/0003-create-symlink-for-python-module.patch
new file mode 100644
index 0000000..9e371e9
--- /dev/null
+++ b/0003-create-symlink-for-python-module.patch
@@ -0,0 +1,25 @@
+From 8ef8bebc526a48a6264fff7b21822580251f22e9 Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
+Date: Sun, 22 Feb 2026 15:46:45 +0000
+Subject: [PATCH 3/3] create symlink for python module
+
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 9356eb0c..dbdc3df6 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -244,7 +244,7 @@ if(USE_PYTHON)
+ # Windows will need a special case due to not supporting symlinks.
+ add_custom_command(
+ TARGET libledger POST_BUILD
+- COMMAND ${CMAKE_COMMAND} -E copy_if_different
++ COMMAND ${CMAKE_COMMAND} -E create_symlink
+ $<TARGET_FILE:libledger> "${CMAKE_BINARY_DIR}/${_ledger_python_module_name}")
+ install(
+ FILES "${CMAKE_BINARY_DIR}/${_ledger_python_module_name}"
+--
+2.53.0
+
diff --git a/ledger.spec b/ledger.spec
index 1aaad09..b31f570 100644
--- a/ledger.spec
+++ b/ledger.spec
@@ -11,6 +11,10 @@ Source0: https://github.com/ledger/ledger/archive/v%{version}.tar.gz
Patch: 0001-disable-cmake-test.patch
# required for f43 tests
Patch: 0002-update-start-method-for-tests.patch
+# create symlink instead of a copy
+# required during the build for the documentation
+# corrected later
+Patch: 0003-create-symlink-for-python-module.patch
BuildRequires: boost-devel
BuildRequires: cmake
@@ -95,6 +99,9 @@ for i in demo.ledger divzero.dat drewr3.dat drewr.dat sample.dat standard.dat tr
install -p -m0644 test/input/${i} %{buildroot}%{_pkgdocdir}/samples/${i}
done
+# correct symlink to make it relative
+pushd %{buildroot}%{python3_sitearch} && ln -sfv ../../libledger.so.3 ./ledger.so && popd
+
%check
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%ctest
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-16 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-16 11:51 [rpms/ledger] f44: feat: use symlink for python module (fixes rb#2405925, rb#2380701, rh#2405078) Ankur Sinha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox