Wrapped python programs get native-inputs in PYTHONPATH

OpenSubmitted by Marius Bakke.
Details
6 participants
  • Arun Isaac
  • Ricardo Wurmus via web
  • Leo Famulari
  • Ludovic Courtès
  • Marius Bakke
  • Ricardo Wurmus
Owner
unassigned
Severity
normal
M
M
Marius Bakke wrote on 20 Dec 2016 00:28
(address . bug-guix@gnu.org)
87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
The 'wrap' phase of 'python-build-system' adds native-inputs to
PYTHONPATH of the wrapped programs. This causes unnecessary runtime
dependencies and may create problems when cross-compiling.

Given that all python dependencies are now supposed to be propagated,
perhaps we can simply remove the wrap phase? It only touches PYTHONPATH.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhYbToACgkQoqBt8qM6
VPrqCgf9ET1NPk/I7q7M1zPHlbqOOrYWkk2fS7RAH3Un/X33Vve1DzKWsj7OQ7LO
YdU8ME0f8wJZ+tILUMawNRt/lKs/CmHug+9aOcqSfN7O8jawFVXxEPIE4U5wCM72
pMwhbu5TwRUZACD7G1168U257uyHpir26rf3wypbzWeAJFr50LEfxbPeBXjsR81v
YPYUUeJ1tCR1DedtU0Ih4TK8eW1ipveYMyw1iT9W+OMFO+y8qZwy1NyRNSrHgOcM
Ur/rmMqjJc+Yhvf37effW6Jg8OODBsqZzocVVqtvetk6Uo7S3jKKFu+Ov+SKyvSJ
FKNV5SC+DFxHSbdG2i35yMit8bGMcA==
=Ed8O
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 20 Dec 2016 15:00
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 25235@debbugs.gnu.org)
87y3zahf8t.fsf@gnu.org
Marius Bakke <mbakke@fastmail.com> skribis:

Toggle quote (7 lines)
> The 'wrap' phase of 'python-build-system' adds native-inputs to
> PYTHONPATH of the wrapped programs. This causes unnecessary runtime
> dependencies and may create problems when cross-compiling.
>
> Given that all python dependencies are now supposed to be propagated,
> perhaps we can simply remove the wrap phase? It only touches PYTHONPATH.

We cannot simply remove it: it is meant for packages that provide
standalone programs, such as ‘certbot’. For these, it automatically
wraps bin/* and we don’t even have to have propagated inputs, which is
pretty cool.

However, you are right that native inputs shouldn’t be there. Probably
we need to add some filtering in the ‘wrap’ phase?

Ludo’.
L
L
Leo Famulari wrote on 26 Dec 2016 19:26
(name . Ludovic Courtès)(address . ludo@gnu.org)
20161226182608.GA20609@jasmine
On Tue, Dec 20, 2016 at 03:00:50PM +0100, Ludovic Courtès wrote:
Toggle quote (17 lines)
> Marius Bakke <mbakke@fastmail.com> skribis:
>
> > The 'wrap' phase of 'python-build-system' adds native-inputs to
> > PYTHONPATH of the wrapped programs. This causes unnecessary runtime
> > dependencies and may create problems when cross-compiling.
> >
> > Given that all python dependencies are now supposed to be propagated,
> > perhaps we can simply remove the wrap phase? It only touches PYTHONPATH.
>
> We cannot simply remove it: it is meant for packages that provide
> standalone programs, such as ‘certbot’. For these, it automatically
> wraps bin/* and we don’t even have to have propagated inputs, which is
> pretty cool.
>
> However, you are right that native inputs shouldn’t be there. Probably
> we need to add some filtering in the ‘wrap’ phase?

While looking at the beets package definition with fresh eyes, I realize
that it will surely break once this change is made. So it will make a
good test case for this improvement :)
A
A
Arun Isaac wrote on 29 Mar 2017 13:27
(address . 25235@debbugs.gnu.org)
716a63e7.AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY@mailjet.com
I'm working on fixing this bug. I have modified
guix/build/python-build-system.scm for the same. In particular, I have
added #:use-module (guix packages) because I need the functions
`package-name' and `package-transitive-target-inputs'. But, when I try
building any python-build-system package with something like
"./pre-inst-env guix build scons", I get a ("no code for module" (guix
packages)) error. What am I missing?

Full backtrace follows:

Backtrace:
In ice-9/eval.scm:
432: 19 [eval # ()]
In system/base/compile.scm:
152: 18 [compile-file "/gnu/store/38rxls2y8v8zjva7xq7zv99rv6c81bq3-module-import/guix/build/python-build-system.scm" ...]
43: 17 [call-once #<procedure ae84c0 at system/base/compile.scm:56:5 ()>]
In ice-9/boot-9.scm:
174: 16 [with-throw-handler #t ...]
In system/base/compile.scm:
59: 15 [#<procedure ae8480 at system/base/compile.scm:58:9 ()>]
155: 14 [#<procedure ae8500 at system/base/compile.scm:153:8 (port)> #<closed: file 0>]
218: 13 [read-and-compile #<input: /gnu/store/38rxls2y8v8zjva7xq7zv99rv6c81bq3-module-import/guix/build/python-build-system.scm 6> ...]
234: 12 [lp () #f #<module (#{ g152}#) ae7a20>]
182: 11 [lp (#<procedure compile-tree-il (x e opts)>) (define-module # # ...) ...]
In ice-9/boot-9.scm:
2404: 10 [save-module-excursion #<procedure c967e0 at language/scheme/compile-tree-il.scm:29:3 ()>]
In language/scheme/compile-tree-il.scm:
31: 9 [#<procedure c967e0 at language/scheme/compile-tree-il.scm:29:3 ()>]
In ice-9/psyntax.scm:
1106: 8 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...]
989: 7 [scan ((define-module # # # ...)) () ((top)) ...]
279: 6 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
In ice-9/eval.scm:
411: 5 [eval # ()]
In ice-9/boot-9.scm:
2954: 4 [define-module* (guix build python-build-system) #:filename ...]
2929: 3 [resolve-imports ((# # gnu:) (#) (#) (#) ...)]
2870: 2 [resolve-interface (guix packages) #:select ...]
In unknown file:
?: 1 [scm-error misc-error #f "~A ~S" ("no code for module" (guix packages)) #f]
In ice-9/boot-9.scm:
109: 0 [#<procedure ae8440 at ice-9/boot-9.scm:100:6 (thrown-k . args)> misc-error ...]

ice-9/boot-9.scm:109:20: In procedure #<procedure ae8440 at ice-9/boot-9.scm:100:6 (thrown-k . args)>:
ice-9/boot-9.scm:109:20: no code for module (guix packages)
builder for `/gnu/store/lsrxzd1hdsgpb9zhrdv02dsxihpmxmww-module-import-compiled.drv' failed with exit code 1
@ build-failed /gnu/store/lsrxzd1hdsgpb9zhrdv02dsxihpmxmww-module-import-compiled.drv - 1 builder for `/gnu/store/lsrxzd1hdsgpb9zhrdv02dsxihpmxmww-module-import-compiled.drv' failed with exit code 1
cannot build derivation `/gnu/store/pm2r6cbcfij8d7nzdxkzqx1dq880mhg8-scons-2.3.4.drv': 1 dependencies couldn't be built
guix build: error: build failed: build of `/gnu/store/pm2r6cbcfij8d7nzdxkzqx1dq880mhg8-scons-2.3.4.drv' failed
L
L
Ludovic Courtès wrote on 30 Mar 2017 17:30
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 25235@debbugs.gnu.org)
87o9wiwzn2.fsf@gnu.org
Hello,

Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (10 lines)
> I'm working on fixing this bug. I have modified
> guix/build/python-build-system.scm for the same. In particular, I have
> added #:use-module (guix packages) because I need the functions
> `package-name' and `package-transitive-target-inputs'. But, when I try
> building any python-build-system package with something like
> "./pre-inst-env guix build scons", I get a ("no code for module" (guix
> packages)) error. What am I missing?
>
> Full backtrace follows:

[...]

Toggle quote (6 lines)
> 2954: 4 [define-module* (guix build python-build-system) #:filename ...]
> 2929: 3 [resolve-imports ((# # gnu:) (#) (#) (#) ...)]
> 2870: 2 [resolve-interface (guix packages) #:select ...]
> In unknown file:
> ?: 1 [scm-error misc-error #f "~A ~S" ("no code for module" (guix packages)) #f]

“Build-side” modules, which typically live in (guix build …), should not
depend on “host-side” modules such as (guix packages). That’s because
if we did that, we’d effectively end up importing all of Guix on the
build side, but then we’d also have to serialize data structures such as
packages to pass them from one side to the other. (I hope this makes
sense to you, but if it doesn’t maybe the intro of
shed some light.)

So in short, we cannot use ‘package-name’ and
‘package-transitive-target-inputs’ in this module.

(Time passes…)

I wasn’t sure how to fix this bug myself so I gave it a try and ended up
with the patch below, but I haven’t tested in detail. (You’ll notice
(guix build-system python) is hard to work with because it doesn’t use
gexps yet.)

How does it look?

Thanks,
Ludo’.
Toggle diff (133 lines)
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index 17173f121..a05fd5a79 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -153,7 +153,7 @@ pre-defined variants."
                 #:rest arguments)
   "Return a bag for NAME."
   (define private-keywords
-    '(#:source #:target #:python #:inputs #:native-inputs))
+    '(#:source #:target #:python #:inputs))
 
   (and (not target)                               ;XXX: no cross-compilation
        (bag
@@ -174,6 +174,9 @@ pre-defined variants."
 
 (define* (python-build store name inputs
                        #:key
+                       (native-inputs '())
+                       ;; TODO: Something like this:
+                       ;; (disallowed-references native-inputs)
                        (tests? #t)
                        (test-target "test")
                        (use-setuptools? #t)
@@ -189,17 +192,24 @@ pre-defined variants."
                                   (guix build utils))))
   "Build SOURCE using PYTHON, and with INPUTS.  This assumes that SOURCE
 provides a 'setup.py' file as its build system."
+  (define canonicalize-reference
+    (match-lambda
+      (((? derivation? source))
+       (derivation->output-path source))
+      (((? package? package))
+       (derivation->output-path
+        (package-derivation store package system)))
+      ((source)
+       source)
+      (source
+       source)))
+
   (define builder
     `(begin
        (use-modules ,@modules)
        (python-build #:name ,name
-                     #:source ,(match (assoc-ref inputs "source")
-                                 (((? derivation? source))
-                                  (derivation->output-path source))
-                                 ((source)
-                                  source)
-                                 (source
-                                  source))
+                     #:source ,(canonicalize-reference
+                                (assoc-ref inputs "source"))
                      #:configure-flags ,configure-flags
                      #:system ,system
                      #:test-target ,test-target
@@ -209,7 +219,17 @@ provides a 'setup.py' file as its build system."
                      #:outputs %outputs
                      #:search-paths ',(map search-path-specification->sexp
                                            search-paths)
-                     #:inputs %build-inputs)))
+                     #:inputs %build-inputs
+
+                     ;; We call them "native inputs" but there's no
+                     ;; cross-compilation here, so that really means
+                     ;; "build-time-only" inputs, things should not be
+                     ;; run-time dependencies.
+                     #:native-inputs ',(map (match-lambda
+                                              ((name . rest)
+                                               `(,name
+                                                 . ,(canonicalize-reference rest))))
+                                            native-inputs))))
 
   (define guile-for-build
     (match guile
@@ -222,6 +242,8 @@ provides a 'setup.py' file as its build system."
 
   (build-expression->derivation store name builder
                                 #:inputs inputs
+                                ;; TODO:
+                                ;; #:disallowed-references disallowed-references
                                 #:system system
                                 #:modules imported-modules
                                 #:outputs outputs
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index dd07986b9..1ca26104b 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
@@ -184,7 +184,7 @@ when running checks after installing the package."
                          configure-flags)))
     (call-setuppy "install" params use-setuptools?)))
 
-(define* (wrap #:key inputs outputs #:allow-other-keys)
+(define* (wrap #:key native-inputs inputs outputs #:allow-other-keys)
   (define (list-of-files dir)
     (map (cut string-append dir "/" <>)
          (or (scandir dir (lambda (f)
@@ -199,14 +199,27 @@ when running checks after installing the package."
                         (string-append dir "/sbin"))))
                 outputs))
 
+  (define build-time-inputs
+    ;; Built-time-only dependencies.
+    (match native-inputs
+      (((names . directories) ...)
+       directories)))
+
+  (define (build-time-dependency? item)
+    (any (cut string-prefix? <> item)
+         build-time-inputs))
+
+  ;; Wrap binaries such that PYTHONPATH is set appropriately, but remove
+  ;; build-time-only dependencies (aka. #:native-inputs) from the search path.
   (let* ((out  (assoc-ref outputs "out"))
          (python (assoc-ref inputs "python"))
+         (path (search-path-as-string->list
+                (or (getenv "PYTHONPATH") "")))
          (var `("PYTHONPATH" prefix
                 ,(cons (string-append out "/lib/python"
                                       (get-python-version python)
                                       "/site-packages")
-                       (search-path-as-string->list
-                        (or (getenv "PYTHONPATH") ""))))))
+                       (remove build-time-dependency? path)))))
     (for-each (lambda (dir)
                 (let ((files (list-of-files dir)))
                   (for-each (cut wrap-program <> var)
A
A
Arun Isaac wrote on 30 Mar 2017 21:07
(address . 25235@debbugs.gnu.org)
e01723b7.AEMAIlnS11YAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY3Vef@mailjet.com
Toggle quote (9 lines)
> “Build-side” modules, which typically live in (guix build …), should not
> depend on “host-side” modules such as (guix packages). That’s because
> if we did that, we’d effectively end up importing all of Guix on the
> build side, but then we’d also have to serialize data structures such as
> packages to pass them from one side to the other. (I hope this makes
> sense to you, but if it doesn’t maybe the intro of
> <https://gnu.org/s/guix/manual/html_node/G_002dExpressions.html> can
> shed some light.)

It makes some sense, but I'll read up more.

Toggle quote (3 lines)
> So in short, we cannot use ‘package-name’ and
> ‘package-transitive-target-inputs’ in this module.

Ok.

Toggle quote (9 lines)
> (Time passes…)
>
> I wasn’t sure how to fix this bug myself so I gave it a try and ended up
> with the patch below, but I haven’t tested in detail. (You’ll notice
> (guix build-system python) is hard to work with because it doesn’t use
> gexps yet.)
>
> How does it look?

I'm travelling now. I'll get back on Monday and study this patch.
A
A
Arun Isaac wrote on 4 Apr 2017 19:02
(address . 25235@debbugs.gnu.org)
a18c806b.AEEAJFKBgTAAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY49Gt@mailjet.com
Toggle quote (2 lines)
> How does it look?

I tried your patch. But native-inputs are still there in the wrapped
PYTHONPATH. I printed out the results from various steps from the wrap
phase. They are as follows:

`build-time-inputs' is

("/gnu/store/5wbi6vsi12bmpzygwhys3c0cc6sjdw40-python-beautifulsoup4-4.5.3"
"/gnu/store/kc5gl1j85y9ispjsgbg5f5c6jdy1k32s-python-flask-0.11.1"
"/gnu/store/3ib43rpca6qzwfcav8s9ivm3dikpxq87-python-mock-1.0.1"
"/gnu/store/6q4hszis7z6x44ig2zlwjwlcjy3vvfmp-python-mpd2-0.5.5"
"/gnu/store/5wx6yffx6dppd2dr91qfi1jlpqlp9f5m-python-nose-1.3.7"
"/gnu/store/kqjfgfwzm7sq43fnng1w23mjyr2xrd75-python-pathlib-1.0.1"
"/gnu/store/b9yn8bfd43pvrp2wyinf6rf2qw113r5p-python-pyxdg-0.25"
"/gnu/store/g4vfl4wy81y14fjhlpmgqh0i01cg37mb-python-pylast-1.6.0"
"/gnu/store/nim5r75b1kzawln3a1bgag2f12vdmb8x-python-rarfile-2.8"
"/gnu/store/wbaaacm1m7bzbhi3z3scwbz2p4pf2ybg-python-responses-0.5.1")

`path' is

("/gnu/store/5wbi6vsi12bmpzygwhys3c0cc6sjdw40-python-beautifulsoup4-4.5.3/lib/python3.5/site-packages"
"/gnu/store/r3f04sda4gh5vbsa7zb5x0ygf326cp75-python-flask-0.11.1/lib/python3.5/site-packages"
"/gnu/store/3ib43rpca6qzwfcav8s9ivm3dikpxq87-python-mock-1.0.1/lib/python3.5/site-packages"
"/gnu/store/5mkb6im3dijkw4f5146mjz4c49qgcklq-python-mpd2-0.5.5/lib/python3.5/site-packages"
"/gnu/store/9z450rcsza3x448ky83fkd5636ck9aqd-python-nose-1.3.7/lib/python3.5/site-packages"
"/gnu/store/kqjfgfwzm7sq43fnng1w23mjyr2xrd75-python-pathlib-1.0.1/lib/python3.5/site-packages"
"/gnu/store/b9yn8bfd43pvrp2wyinf6rf2qw113r5p-python-pyxdg-0.25/lib/python3.5/site-packages"
"/gnu/store/g4vfl4wy81y14fjhlpmgqh0i01cg37mb-python-pylast-1.6.0/lib/python3.5/site-packages"
"/gnu/store/nim5r75b1kzawln3a1bgag2f12vdmb8x-python-rarfile-2.8/lib/python3.5/site-packages"
"/gnu/store/wbaaacm1m7bzbhi3z3scwbz2p4pf2ybg-python-responses-0.5.1/lib/python3.5/site-packages"
"/gnu/store/m6ir6mj7laxcwsjrz0lvxm7q04w0anhp-python-discogs-client-2.2.1/lib/python3.5/site-packages"
"/gnu/store/v3xiyw0cj08qmpn08jaiznd8ak3nvdga-python-jellyfish-0.5.6/lib/python3.5/site-packages"
"/gnu/store/pwxvvi24950x6rgvl4f46z89sbpa2b7a-python-munkres-1.0.8/lib/python3.5/site-packages"
"/gnu/store/nws3867b5q78ri461wr3rdwgqzasvv2a-python-musicbrainzngs-0.6/lib/python3.5/site-packages"
"/gnu/store/wsw2nr30nhz29dww1hfjb6lgqn2ckrgy-python-mutagen-1.36/lib/python3.5/site-packages"
"/gnu/store/n7fh268b1g1g87s4djvm672p2xmwkd5r-python-pyyaml-3.12/lib/python3.5/site-packages"
"/gnu/store/y3ncl6ia04vqdkhnhgzb3iabcsczj0zb-python-unidecode-0.04.20/lib/python3.5/site-packages"
"/gnu/store/alk9r3rir93pjmv8im20f8xrvv90219z-python-3.5.2/lib/python3.5/site-packages"
"/gnu/store/z2mmzglkykws7hc9k2sr40fidiv62cpa-python-werkzeug-0.11.15/lib/python3.5/site-packages"
"/gnu/store/5w60y9zyjskv179sf4pmq2kzpff887dv-python-click-6.7/lib/python3.5/site-packages"
"/gnu/store/f4qqgaql0f95alxrz9r52n3m5ahjrc1s-python-jinja2-2.8/lib/python3.5/site-packages"
"/gnu/store/n0l3szawn661n2rjk6nnbajzzc02pmfj-python-itsdangerous-0.24/lib/python3.5/site-packages"
"/gnu/store/rpnfm1v7vnwxl3wpbadz2bz25s2x1bbg-python-six-1.10.0/lib/python3.5/site-packages"
"/gnu/store/64ahrdmjmmm8id5327i5kqjj8ppvi2kl-python-cookies-2.2.1/lib/python3.5/site-packages"
"/gnu/store/2iyrxbr6k1qdcrhfpv3cz1nh1znwnga5-python-requests-2.13.0/lib/python3.5/site-packages"
"/gnu/store/0c28plwcf33lnibf27h8ijig467pphiw-python-oauthlib-1.0.3/lib/python3.5/site-packages"
"/gnu/store/m48bcrmrzrcb79p6dhaq0diwr3aacfq3-python-markupsafe-0.23/lib/python3.5/site-packages")

(remove build-time-dependency? path) is

("/gnu/store/r3f04sda4gh5vbsa7zb5x0ygf326cp75-python-flask-0.11.1/lib/python3.5/site-packages"
"/gnu/store/5mkb6im3dijkw4f5146mjz4c49qgcklq-python-mpd2-0.5.5/lib/python3.5/site-packages"
"/gnu/store/9z450rcsza3x448ky83fkd5636ck9aqd-python-nose-1.3.7/lib/python3.5/site-packages"
"/gnu/store/m6ir6mj7laxcwsjrz0lvxm7q04w0anhp-python-discogs-client-2.2.1/lib/python3.5/site-packages"
"/gnu/store/v3xiyw0cj08qmpn08jaiznd8ak3nvdga-python-jellyfish-0.5.6/lib/python3.5/site-packages"
"/gnu/store/pwxvvi24950x6rgvl4f46z89sbpa2b7a-python-munkres-1.0.8/lib/python3.5/site-packages"
"/gnu/store/nws3867b5q78ri461wr3rdwgqzasvv2a-python-musicbrainzngs-0.6/lib/python3.5/site-packages"
"/gnu/store/wsw2nr30nhz29dww1hfjb6lgqn2ckrgy-python-mutagen-1.36/lib/python3.5/site-packages"
"/gnu/store/n7fh268b1g1g87s4djvm672p2xmwkd5r-python-pyyaml-3.12/lib/python3.5/site-packages"
"/gnu/store/y3ncl6ia04vqdkhnhgzb3iabcsczj0zb-python-unidecode-0.04.20/lib/python3.5/site-packages"
"/gnu/store/alk9r3rir93pjmv8im20f8xrvv90219z-python-3.5.2/lib/python3.5/site-packages"
"/gnu/store/z2mmzglkykws7hc9k2sr40fidiv62cpa-python-werkzeug-0.11.15/lib/python3.5/site-packages"
"/gnu/store/5w60y9zyjskv179sf4pmq2kzpff887dv-python-click-6.7/lib/python3.5/site-packages"
"/gnu/store/f4qqgaql0f95alxrz9r52n3m5ahjrc1s-python-jinja2-2.8/lib/python3.5/site-packages"
"/gnu/store/n0l3szawn661n2rjk6nnbajzzc02pmfj-python-itsdangerous-0.24/lib/python3.5/site-packages"
"/gnu/store/rpnfm1v7vnwxl3wpbadz2bz25s2x1bbg-python-six-1.10.0/lib/python3.5/site-packages"
"/gnu/store/64ahrdmjmmm8id5327i5kqjj8ppvi2kl-python-cookies-2.2.1/lib/python3.5/site-packages"
"/gnu/store/2iyrxbr6k1qdcrhfpv3cz1nh1znwnga5-python-requests-2.13.0/lib/python3.5/site-packages"
"/gnu/store/0c28plwcf33lnibf27h8ijig467pphiw-python-oauthlib-1.0.3/lib/python3.5/site-packages"
"/gnu/store/m48bcrmrzrcb79p6dhaq0diwr3aacfq3-python-markupsafe-0.23/lib/python3.5/site-packages")

Somehow, the paths in `build-time-inputs' are not the same as those in
`path'. Notice the different hashes. Hence `remove' does not succeed in
filtering them out.

Toggle quote (3 lines)
> + ;; TODO: Something like this:
> + ;; (disallowed-references native-inputs)

What is this part for?
R
R
Ricardo Wurmus wrote on 7 Feb 2019 14:22
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 25235@debbugs.gnu.org)
87pns34tts.fsf@elephly.net
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (5 lines)
>> + ;; TODO: Something like this:
>> + ;; (disallowed-references native-inputs)
>
> What is this part for?

This is to ensure that no references to any native input are retained in
the output. (Think of it as an assertion that is checked at the end of
the build.)

~~ Ricardo
R
R
Ricardo Wurmus via web wrote on 6 Apr 2020 16:49
(no subject)
(address . 25235@debbugs.gnu.org)
7f6e5ae41520.2159a21282e87de@guile.gnu.org
Have you been able to figure out why some of the items differ in the two lists?
A
A
Arun Isaac wrote on 9 Apr 2020 02:02
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 25235@debbugs.gnu.org)
cu78sj5pluo.fsf@systemreboot.net
Toggle quote (2 lines)
> Have you been able to figure out why some of the items differ in the two lists?

Hi! Are you asking me? I haven't worked on this in a very long
time. But I'll give it another shot now and get back to you.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6OZiEACgkQLiXui2GA
K7OAPQf/cyL5HaPfxKPxtfU7jAuY+tvJwnd0M/LxUu4UYiCLKLD4Ved/qWBOd9uK
ylo6qgMs5cqj0BBqoCjxZQPLC+T7gHc3qnDeyoCx5y/LnVjRCU5yBaYimrNnQJ9B
SS0OVuo8vw8/sxq8VhHHpweZsHTG89MXdts3H5u6PqxbypbMZoLNbb30kenwRuEy
hpurZtOcvl9t1X7+GV7UoG8nHZlH1DMURpFGfuleMeTGWApFSEnAbGepJonCU9bs
vpJFzbSmmb+wNWfwawJfyfUmQGMtixAAsOEdrpo+sjWBCA+Nj7T7gpTG3vNOi1w0
ypW9PdfkI1UWb2T6p7bE9u0WKGBP6A==
=Lxvu
-----END PGP SIGNATURE-----

A
A
Arun Isaac wrote on 21 Apr 2020 04:15
Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 25235@debbugs.gnu.org)
cu7imht4m9n.fsf@systemreboot.net
Hi,

Toggle quote (3 lines)
> Have you been able to figure out why some of the items differ in the
> two lists?

The two lists are the same if `guix build' is invoked with the
`--no-grafts' flag. I don't understand grafts very well and am not sure
how that can be fixed. Any ideas?

See different output below with and without the `--no-grafts' flag.

$ guix build python-mock

Toggle snippet (20 lines)
`build-time-inputs' is
(/gnu/store/dhs3v8rfzazq9cb37pqs7fdm5hd7zmf0-python-unittest2-1.1.0)

`path' is
(/gnu/store/v70qcgga1r2m6scnard8s61dqh859mn2-python-unittest2-1.1.0/lib/python3.7/site-packages
/gnu/store/w408dkc1lynq5kqi2cxkvikalp6w35qw-python-pbr-minimal-3.0.1/lib/python3.7/site-packages
/gnu/store/bwqidwykphzv10n454kxv3hfippq8qrx-python-six-1.12.0/lib/python3.7/site-packages
/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/site-packages
/gnu/store/k4a9433nghpjhs101cm9v8k64bmd8iqf-python-traceback2-1.4.0/lib/python3.7/site-packages
/gnu/store/3nl9hk7f59vsxgr7xmnqgc15y9c3rwpg-python-linecache2-1.0.0/lib/python3.7/site-packages)

`(remove build-time-dependency? path)' is
(/gnu/store/v70qcgga1r2m6scnard8s61dqh859mn2-python-unittest2-1.1.0/lib/python3.7/site-packages
/gnu/store/w408dkc1lynq5kqi2cxkvikalp6w35qw-python-pbr-minimal-3.0.1/lib/python3.7/site-packages
/gnu/store/bwqidwykphzv10n454kxv3hfippq8qrx-python-six-1.12.0/lib/python3.7/site-packages
/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/site-packages
/gnu/store/k4a9433nghpjhs101cm9v8k64bmd8iqf-python-traceback2-1.4.0/lib/python3.7/site-packages
/gnu/store/3nl9hk7f59vsxgr7xmnqgc15y9c3rwpg-python-linecache2-1.0.0/lib/python3.7/site-packages)

$ guix build --no-grafts python-mock

Toggle snippet (19 lines)
`build-time-inputs' is
(/gnu/store/m01qbb9sgymxh2xqwpnbv58h60yl4pz0-python-unittest2-1.1.0)

`path' is
(/gnu/store/m01qbb9sgymxh2xqwpnbv58h60yl4pz0-python-unittest2-1.1.0/lib/python3.7/site-packages
/gnu/store/9k5hyd9d7b3r4yzadd6phphf12l2mfc8-python-pbr-minimal-3.0.1/lib/python3.7/site-packages
/gnu/store/p8p65yd0pf95yn50iib0jw05p0n4mr9p-python-six-1.12.0/lib/python3.7/site-packages
/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/site-packages
/gnu/store/dvn1fz82ccjg7dnqqmkxhwp720wnmriw-python-traceback2-1.4.0/lib/python3.7/site-packages
/gnu/store/vnbk5jswscv68qasfbhmh7wqlsibyism-python-linecache2-1.0.0/lib/python3.7/site-packages)

`(remove build-time-dependency? path)' is
(/gnu/store/9k5hyd9d7b3r4yzadd6phphf12l2mfc8-python-pbr-minimal-3.0.1/lib/python3.7/site-packages
/gnu/store/p8p65yd0pf95yn50iib0jw05p0n4mr9p-python-six-1.12.0/lib/python3.7/site-packages
/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/site-packages
/gnu/store/dvn1fz82ccjg7dnqqmkxhwp720wnmriw-python-traceback2-1.4.0/lib/python3.7/site-packages
/gnu/store/vnbk5jswscv68qasfbhmh7wqlsibyism-python-linecache2-1.0.0/lib/python3.7/site-packages)

Regards,
Arun
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6eV0UACgkQLiXui2GA
K7OzgwgAh0Sc2MhdnPj5HMsuWQnCiib+zKMI1P2y7TfsKuM+m/YiqWzs9V+ushmf
K7qErupO44DrqpKfl70iDDfiWjkzRkBloq3um40+dRebKNlfMaBbwlDRvxTc1OAw
GeLRTn4GLXkL2gwd78AHXU+ALmupWxJRaNYZCZwDKqOry5Xcvjb6pc10REGQyTBh
28VpP7ezUWBIk9e98xZf/Ct/wNyNXMSABiGgersUr/vBEuQmQ654hg86VrFOAgsi
X+TM9xxZzsw4ZJ7BiutOlKC1TIlzl7DJHxqTwtWngPEB5U8Qu9E+Rnz2Iy4yVD5a
bSvSF+2UxftTp8Q5JtvdBRmrsyMtUA==
=E6gx
-----END PGP SIGNATURE-----

?