unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44309] [PATCH] gnu: gnucash: Enable python bindings.
@ 2020-10-29 15:29 Prafulla Giri
  2020-11-01  4:44 ` [bug#44309] Further Cleanups Prafulla Giri
  2020-11-02 13:52 ` [bug#44309] New and Improved Patch Prafulla Giri
  0 siblings, 2 replies; 5+ messages in thread
From: Prafulla Giri @ 2020-10-29 15:29 UTC (permalink / raw)
  To: 44309


[-- Attachment #1.1: Type: text/plain, Size: 291 bytes --]

Esteemed maintainers,

Attached is a patch that enables python bindings in gnucash.

I have also taken the liberty of adding native-search-paths field and
adding 'PYTHONPATH' to it for foreign distro users who might want to use
gnucash python bindings with host-os-supplied python.

Thanks!

[-- Attachment #1.2: Type: text/html, Size: 408 bytes --]

[-- Attachment #2: 0001-gnu-gnucash-Enable-python-bindings.patch --]
[-- Type: text/x-patch, Size: 2609 bytes --]

From a7ea4f9743441219940442be188238e363c4943f Mon Sep 17 00:00:00 2001
From: Prafulla Giri <pratheblackdiamond@gmail.com>
Date: Thu, 29 Oct 2020 20:47:37 +0545
Subject: [PATCH] gnu: gnucash: Enable python bindings.

* gnu/packages/gnucash.scm (gnucash):
  [inputs]: Add python.
  [arguments]<configure-flags>: Add '-DWITH_PYTHON=ON'
  [native-search-paths]: New field. Add PYTHONPATH.
---
 gnu/packages/gnucash.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 8f58ce332a..d5a356ab54 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -24,6 +24,7 @@
 
 (define-module (gnu packages gnucash)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -48,6 +49,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
@@ -82,6 +84,7 @@
        ("libxslt" ,libxslt)
        ("webkitgtk" ,webkitgtk)
        ("aqbanking" ,aqbanking)
+       ("python" ,python)
        ("perl-date-manip" ,perl-date-manip)
        ("perl-finance-quote" ,perl-finance-quote)
        ("tzdata" ,tzdata-for-tests)))
@@ -98,6 +101,7 @@
     (outputs '("out" "doc" "debug"))
     (arguments
      `(#:test-target "check"
+       #:configure-flags '("-DWITH_PYTHON=ON")
        #:make-flags '("GUILE_AUTO_COMPILE=0")
        #:modules ((guix build cmake-build-system)
                   ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
@@ -184,6 +188,16 @@
            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
          (add-after 'install 'glib-or-gtk-wrap
            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
+    ;; Export 'PYTHONPATH' for foreign-distro users who might want to
+    ;; use gnucash python bindings with their host-os-supplied python
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "PYTHONPATH")
+       (files `(,(string-append "lib/python"
+                                (version-major+minor
+                                 (package-version python))
+                                "/site-packages"))))))
     (home-page "https://www.gnucash.org/")
     (synopsis "Personal and small business financial accounting software")
     (description
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-11  9:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 15:29 [bug#44309] [PATCH] gnu: gnucash: Enable python bindings Prafulla Giri
2020-11-01  4:44 ` [bug#44309] Further Cleanups Prafulla Giri
2020-11-02 13:52 ` [bug#44309] New and Improved Patch Prafulla Giri
2020-11-10 21:10   ` bug#44309: " Marius Bakke
2020-11-11  9:26     ` [bug#44309] " Prafulla Giri

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).