[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing package-with-python2
From: |
Efraim Flashner |
Subject: |
Re: Fixing package-with-python2 |
Date: |
Tue, 2 Feb 2016 09:50:44 +0200 |
On Mon, 01 Feb 2016 23:07:40 +0100
address@hidden (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 <address@hidden> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
pgpcPO6OguzPK.pgp
Description: OpenPGP digital signature
- Fixing package-with-python2 (was: Package transformations), Thompson, David, 2016/02/01
- Re: Fixing package-with-python2 (was: Package transformations), Pjotr Prins, 2016/02/01
- Re: Fixing package-with-python2 (was: Package transformations), Efraim Flashner, 2016/02/01
- Re: Fixing package-with-python2 (was: Package transformations), Andreas Enge, 2016/02/01
- Re: Fixing package-with-python2, Ludovic Courtès, 2016/02/01
- Re: Fixing package-with-python2, Thompson, David, 2016/02/01
- Re: Fixing package-with-python2,
Efraim Flashner <=
- Re: Fixing package-with-python2, Ludovic Courtès, 2016/02/03
- Re: bug#22437: Fixing package-with-python2, Ludovic Courtès, 2016/02/07
- Re: bug#22437: Fixing package-with-python2, Ludovic Courtès, 2016/02/08
- Re: bug#22437: Fixing package-with-python2, Andreas Enge, 2016/02/07
- Re: bug#22437: Fixing package-with-python2, Ludovic Courtès, 2016/02/07