[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Naming scheme for Python packages
From: |
Andreas Enge |
Subject: |
Re: Naming scheme for Python packages |
Date: |
Fri, 6 Sep 2013 23:53:11 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Sep 05, 2013 at 03:00:27PM +0200, Ludovic Courtès wrote:
> BTW, I haven’t check whether this is the case already, but we need
> something like
> (define (package-with-explicit-python p python)
> ;; Return a version of P built for PYTHON.
> (package (inherit p) ...))
> so we can just write:
> (define python2-pytz
> (package-with-explicit-python python-pytz python-2))
The attached patch does almost this, following our offline discussion on
how to create packages recursively on the fly:
- It adds an argument pair "#:python ,python-2", or replaces an already
present argument "#:python something-else", and this recursively
for all inputs and native-inputs that use the python build system.
- It rewrites the corresponding names from "python-..." to "python2-...",
or adds a prefix "python2-".
So one can write
(define python2-pytz
(package-with-explicit-python python-pytz))
As the second argument would always be python-2, I decided to drop it.
When trying this with python2-babel, the previous code in python.scm
(commented out in the attached patch) and the new one create almost the same
derivations, that differ only in
/nix/store/4rrnwqsj8c086zzviyypr4fikb7pz49v-python2-babel-0.9.6-guile-builder
vs.
/nix/store/5prbhg600qa9k8p0bgjs12p4dm682gn8-python2-babel-0.9.6-guile-builder
so that the final hash is also different.
Comments are welcome.
Andreas
patch.python
Description: Text document
- Naming scheme for Python packages, Ludovic Courtès, 2013/09/04
- Re: Naming scheme for Python packages, Cyril Roelandt, 2013/09/04
- Re: Naming scheme for Python packages, Cyril Roelandt, 2013/09/04
- Re: Naming scheme for Python packages, Andreas Enge, 2013/09/04
- Re: Naming scheme for Python packages, Andreas Enge, 2013/09/04
- Re: Naming scheme for Python packages, Ludovic Courtès, 2013/09/05
- Re: Naming scheme for Python packages,
Andreas Enge <=
- Re: Naming scheme for Python packages, Ludovic Courtès, 2013/09/07
- Re: Naming scheme for Python packages, Andreas Enge, 2013/09/07
- Re: Naming scheme for Python packages, Ludovic Courtès, 2013/09/08
- Re: Naming scheme for Python packages, Andreas Enge, 2013/09/08
- Re: Naming scheme for Python packages, Ludovic Courtès, 2013/09/08