unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Prafulla Giri <pratheblackdiamond@gmail.com>
To: 44309@debbugs.gnu.org
Subject: [bug#44309] [PATCH] gnu: gnucash: Enable python bindings.
Date: Thu, 29 Oct 2020 21:14:00 +0545	[thread overview]
Message-ID: <CAFw+=j2NSyb3YywVU1t4JtPF-Y9JBoLjW-m5cqHQ9VEpuO+i0w@mail.gmail.com> (raw)


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


             reply	other threads:[~2020-10-29 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 15:29 Prafulla Giri [this message]
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

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='CAFw+=j2NSyb3YywVU1t4JtPF-Y9JBoLjW-m5cqHQ9VEpuO+i0w@mail.gmail.com' \
    --to=pratheblackdiamond@gmail.com \
    --cc=44309@debbugs.gnu.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.
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).