[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: |
Sat, 7 Sep 2013 23:25:13 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hello,
and thanks for your comments! I am attaching a new patch.
On Sat, Sep 07, 2013 at 02:49:07PM +0200, Ludovic Courtès wrote:
> Still it’s better to keep it, as a generic version. Then, we can have:
> (define package-with-python-2
> (cut package-with-explicit-python <> python-2))
> and then use that as needed.
I modified with two additional parameters, OLD-PREFIX and NEW-PREFIX:
When going to python-2, one rewrites the prefix "python-" to "python2-".
The current patch would allow to go back to Python 3 by calling
(package-with-explicit-python p python "python2-" "python-").
> Sylistic note: never use ‘car’, ‘cdr’, and co; use ‘match’ instead: it
> leads to code that is both more readable and more robust (info "(guile)
> Pattern Matching"). In that case, you can even use ‘match-lambda’,
> which is equivalent to:
> (lambda (x)
> (match x
> ...))
This is rather surprising for a language based on lists...
But admittedly, the code becomes more readable.
> Second remark: inputs are actually tuples of one of two forms:
> (name package)
> (name package output)
Or a third one, (name-of-patch store-path-of-patch), which was already
handled. The current patch should handle all cases.
> (map rewrite (package-inputs p)) is enough; if (package-inputs p) is
> null?, then that’ll return the empty list too.
This is something that I had tested, and strangely, it did not work at the
time I made the test. But the error must have lain somewhere else then.
Andreas
patch
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, 2013/09/06
- Re: Naming scheme for Python packages, Ludovic Courtès, 2013/09/07
- Re: Naming scheme for Python packages,
Andreas Enge <=
- 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