public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ledger] f43: feat: use symlink for python module (fixes rb#2405925, rb#2380701, rh#2405078)
Date: Thu, 16 Jul 2026 12:29:12 GMT	[thread overview]
Message-ID: <178420495235.1.17931726384924461040.rpms-ledger-736980676e6c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ledger
Branch : f43
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=f43

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

                 reply	other threads:[~2026-07-16 12:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178420495235.1.17931726384924461040.rpms-ledger-736980676e6c@fedoraproject.org \
    --to=sanjay.ankur@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox