all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Fixing package-with-python2
Date: Tue, 2 Feb 2016 09:50:44 +0200	[thread overview]
Message-ID: <20160202095044.0f7c8af4@debian-netbook> (raw)
In-Reply-To: <87vb68nkyb.fsf@gnu.org>

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

On Mon, 01 Feb 2016 23:07:40 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> 
> An idea I haven’t taken the time to test yet would be to use
> ‘properties’:
> 
>   (define python-foobar   ;with Python 3
>     (package
>       (name "foobar")
>       ;; Specify which Python 2 variant to use.
>       (properties `((python2-variant . ,(delay python2-foobar))))))
> 
>   (define python2-foobar
>     (package (inherit python-foobar)
>       ;; … stuff beyond the mechanical python 2→3 switch…
>       ))
> 
> ‘package-with-python2’ would honor this ‘python2-variant’ property.
> 
> Thoughts?
> 
> Ludo’.

I like a lot that it should remove the need to propagate the special python2-
packages all the way out to the leaf packages. What else could we use this
for? minimal/bootstrap versions?

"The python people" have said that one day python4 will happen and they don't
plan on having it be as much of a break like the python2->python3 change was.
package-with-explicit-python is already set up to handle having a main
package definition and multiple automated definitions.

I prefer when define-public is the start of a package definition, but here's
an idea I just had about refactoring out the common parts of python packages.

(let*
  (name "python-foobar")
  (version "1.2.3")
  ...
  (define-public python3-foobar
    (package-with-python3 python-foobar)
  (define-public python2-foobar
    (package (inherit (package-with-python2 python-foobar))
    (native-inputs
     `(("python2-setuptools" ,python2-setuptools))
       ,@(package-native-inputs foobar)))))
-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-02-02  7:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 13:49 Fixing package-with-python2 (was: Package transformations) Thompson, David
2016-02-01 14:26 ` Pjotr Prins
2016-02-01 16:35 ` Efraim Flashner
2016-02-01 16:49   ` Thompson, David
2016-02-01 17:12 ` Andreas Enge
2016-02-01 22:11   ` Fixing package-with-python2 Ludovic Courtès
2016-02-01 22:07 ` Ludovic Courtès
2016-02-01 22:12   ` Thompson, David
2016-02-02  7:50   ` Efraim Flashner [this message]
2016-02-03  8:47   ` bug#22437: " Ludovic Courtès
2016-02-03  8:47   ` Ludovic Courtès
2016-02-07  8:17     ` bug#22437: " Efraim Flashner
2016-02-07  9:32       ` Ricardo Wurmus
2016-02-07 20:35         ` Ludovic Courtès
2016-02-07 20:35         ` Ludovic Courtès
2016-02-07  9:32       ` Ricardo Wurmus
2016-02-07 20:42       ` Ludovic Courtès
2016-02-08 15:11       ` Ludovic Courtès
2016-02-08 15:11       ` Ludovic Courtès
2016-02-07  8:17     ` Efraim Flashner
2016-02-07 11:09     ` Andreas Enge
2016-02-07 20:39       ` Ludovic Courtès
2016-02-07 20:39       ` Ludovic Courtès
2016-02-07 11:09     ` Andreas Enge

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

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

  git send-email \
    --in-reply-to=20160202095044.0f7c8af4@debian-netbook \
    --to=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    --cc=ludo@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.