unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Ekaitz Zarraga <ekaitz@elenq.tech>
Cc: 44170-done@debbugs.gnu.org
Subject: bug#44170: [PATCH] gnu: Correct Inkscape extension dependencies
Date: Mon, 26 Oct 2020 15:56:21 +0000	[thread overview]
Message-ID: <87r1plyo9m.fsf@cbaines.net> (raw)
In-Reply-To: <c5xjZRf7PwKIJfcUW5tLOUtY2eJUE1J5OV4lmeyBftR49MG0zijaroak-G2vmxk_5mBKIdAivDKVWYbwPaqIgKliGiSaCvi7D8W1Hh0RYPg=@elenq.tech>

[-- Attachment #1: Type: text/plain, Size: 5913 bytes --]


Ekaitz Zarraga <ekaitz@elenq.tech> writes:

> Hi Christopher,
>
> Thanks for elaborating further
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>> → export PATH="/gnu/store/11l2qmzfgsp7k345mv6x1vn64q8330kw-python-wrapper-3.8.2/bin:${PATH:+:}$PATH"
>>
>> → echo $PATH
>> /gnu/store/11l2qmzfgsp7k345mv6x1vn64q8330kw-python-wrapper-3.8.2/bin::/gnu/store/hgh67ilwsbx6v2irc7vgrnv354cv4h8a-profile/bin
>>
>> Note the double colon, I don't think it's a problem in terms of
>> functionality, but just in case someone copies this from inkscape as an
>> example, it would be good not to do the same here.
>>
>> Note, there's no need to fix this in kicad. If you do want to, I'd
>> submit a separate commit under a seperate bug.
>>
>
> I see! thanks!
>
>> > wasn't an input before? is it just an error?
>>
>> Well, error is a strong word, in this case, given the build system
>> doesn't support building for a non-native architecture, it's sort of a
>> non-issue. But I would view it as something you're fixing in addition to
>> the changes you're making.
>>
>> It didn't (and still doesn't to some extent) matter that the Python
>> stuff was/is in native-inputs, because cross building this package is
>> impossible because of the build system.
>>
>> However, in case the build system changes to support this, to be
>> consistent with other package definitions, and to be consistent with the
>> general rule that you don't reference native-inputs from the outputs (at
>> least I think that's a rule or at least strong convention), having the
>> Python stuff in inputs is better. Even if the package builds just the
>> same.
>
>
> I see what you mean, great.
> I just moved python-wrapper to inputs and separated the commit so now
> it's just inkscape's changes.
>
> Thanks for your patience!

You're welcome :) I made some tweaks (described below) and pushed this
as 24b233d45c2a04a7a011397234b29fd5d7133110.

> From 5c3043aea4d98823089b8438bb4573d32e28d899 Mon Sep 17 00:00:00 2001
> From: Ekaitz Zarraga <ekaitz@elenq.tech>
> Date: Sun, 25 Oct 2020 13:04:15 +0100
> Subject: [PATCH] gnu: Correct Inkscape extension dependencies
>
>     * gnu/packages/inkscape.scm (inkscape@1.0.1): Add dependencies.

I rewrote the commit message to the following, I think this is more in
line with the style.

gnu: inkscape: Correct extension dependencies.

* gnu/packages/inkscape.scm (inkscape-1.0)[arguments]: Add wrap-program phase.
[inputs]: Move python-wrapper to inputs, and add several python libraries.
[native-inputs]: Remove python-wrapper, as it has moved to inputs.

> ---
>  gnu/packages/inkscape.scm | 30 ++++++++++++++++++++++++++----
>  1 file changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
> index 4ac3cf3966..66756b70a6 100644
> --- a/gnu/packages/inkscape.scm
> +++ b/gnu/packages/inkscape.scm
> @@ -6,6 +6,7 @@
>  ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
>  ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
>  ;;; Copyright © 2020 Boris A. Dekshteyn <boris.dekshteyn@gmail.com>
> +;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -44,6 +45,7 @@
>    #:use-module (gnu packages pdf)
>    #:use-module (gnu packages popt)
>    #:use-module (gnu packages python)
> +  #:use-module (gnu packages python-xyz)
>    #:use-module (gnu packages xml)
>    #:use-module (gnu packages ghostscript)
>    #:use-module (gnu packages fontutils)
> @@ -250,7 +252,23 @@ endif()~%~%"
>           (add-after 'install 'glib-or-gtk-compile-schemas
>             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
>           (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
> -           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
> +           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
> +         (add-after 'install 'wrap-program
> +           ;; Ensure correct Python at runtime.
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (python (assoc-ref inputs "python"))
> +                    (file (string-append out "/bin/inkscape"))
> +                    (path (string-append
> +                           out
> +                           "/lib/python"
> +                           ,(version-major+minor
> +                             (package-version python))
> +                           "/site-packages:"
> +                           (getenv "PYTHONPATH"))))
> +               (wrap-program file
> +                 `("PYTHONPATH" ":" prefix (,path))))
> +             #t)))))

As before, because inkscape's lib doesn't contain anything Python
related, I just wrapped with the PYTHONPATH.

>      (inputs
>       `(("aspell" ,aspell)
>         ("autotrace" ,autotrace)
> @@ -275,15 +293,19 @@ endif()~%~%"
>         ("popt" ,popt)
>         ("potrace" ,potrace)
>         ("lcms" ,lcms)
> -       ("boost" ,boost)))
> +       ("boost" ,boost)
> +       ("python" ,python-wrapper)
> +       ("python-scour" ,python-scour)
> +       ("python-pyserial" ,python-pyserial)
> +       ("python-numpy" ,python-numpy)
> +       ("python-lxml" ,python-lxml)))
>      (native-inputs
>       `(("imagemagick" ,imagemagick)     ;for tests
>         ("intltool" ,intltool)
>         ("glib" ,glib "bin")
>         ("googletest" ,googletest)
>         ("perl" ,perl)
> -       ("pkg-config" ,pkg-config)
> -       ("python" ,python-wrapper)))
> +       ("pkg-config" ,pkg-config)))
>      (home-page "https://inkscape.org/")
>      (synopsis "Vector graphics editor")
>      (description "Inkscape is a vector graphics editor.  What sets Inkscape

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

      reply	other threads:[~2020-10-26 15:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 10:32 [bug#44170] [PATCH] gnu: Correct Inkscape extension dependencies Ekaitz Zarraga
2020-10-23 23:03 ` Ekaitz Zarraga
2020-10-24 19:55   ` Christopher Baines
2020-10-24 21:31     ` Ekaitz Zarraga
2020-10-24 22:14       ` Christopher Baines
2020-10-25 12:23         ` Ekaitz Zarraga
2020-10-26 15:56           ` Christopher Baines [this message]

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=87r1plyo9m.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=44170-done@debbugs.gnu.org \
    --cc=ekaitz@elenq.tech \
    /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).