guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixing package-with-python2 (was: Package transformations)


From: Efraim Flashner
Subject: Re: Fixing package-with-python2 (was: Package transformations)
Date: Mon, 1 Feb 2016 18:35:38 +0200

On Mon, 1 Feb 2016 08:49:10 -0500
"Thompson, David" <address@hidden> wrote:

> On Mon, Feb 1, 2016 at 8:06 AM, Efraim Flashner <address@hidden> wrote:
> 
> > I looked over the commit but not deeply enough yet, would it be possible to
> > use some of the logic in this to fix the package-with-python2 issue?  
> 
> Here's a potential solution for 'package-with-python2': module
> introspection.  AIUI, the issue is that some Python 2 packages need
> extra manual tweaking, but 'package-with-python2' creates package
> variants without these tweaks. Our algorithm could look up
> 'python2-foo' in (gnu packages python) and use that package object, if
> it exists.  This would stop the recursive transformation for that
> branch of the dependency graph and allow us to tweak Python 2 variants
> as needed without fear.

Not all of our python packages are in python.scm. Currently in
guix/build-system/python.scm we have:

(define package-with-python2
  ;; Note: delay call to 'default-python2' until after the 'arguments' field
  ;; of packages is accessed to avoid a circular dependency when evaluating
  ;; the top-level of (gnu packages python).
  (package-with-explicit-python (delay (default-python2))
                                "python-" "python2-"))

Excuse the code, but I think we're looking for something like:

(define package-with-python2
  (if (exists? python2-foo)
    (python2-foo)
    (package-with-explicit-python (delay (default-python2))
                                  "python-" "python2-"))

> Also, somewhat unrelated, package-with-python2 could add setuptools as
> an input to these packages so we can remove all the unnecessary usage
> of it in Python 3 packages.
> 
> Thoughts?

That's something I was thinking of.

-- 
Efraim Flashner   <address@hidden>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: pgpMDLrZd7j2E.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]