From: ludo@gnu.org (Ludovic Courtès)
To: David Thompson <dthompson2@worcester.edu>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] import: Add PyPI importer.
Date: Mon, 29 Sep 2014 09:04:53 +0200 [thread overview]
Message-ID: <87r3yu29gq.fsf@gnu.org> (raw)
In-Reply-To: <8738bbmhln.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Sun, 28 Sep 2014 19:48:52 -0400")
David Thompson <dthompson2@worcester.edu> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> I wonder if there may be shared options between all the importers
>> (like an option for import & live build.)
>>
>> That can still be addressed by exporting an option list from (guix
>> scripts import), like (guix scripts build) does, I think.
>>
>
> Done. Added an empty options list for now. To avoid circular
> dependencies, I had to lazily resolve the importer procedures in
> guix/scripts/import.scm.
Yes, and it’s probably a good idea to do like this anyway, so that (guix
scripts import) doesn’t really have to know about the existing
importers.
[...]
>>> +(define (make-pypi-sexp name version source-url home-page synopsis
>>> + description license)
>>> + "Return the `package' s-expression for a python package with the given NAME,
>>
>> Namely, what do you think of having importers return directly a
>> ‘package’ object? Then there could be a shared ‘package->sexp’
>> procedure, that would to the fancy ‘string-append’ thing like above.
>>
>> And, eventually, we can add an option to do live builds of the generated
>> package objects.
>>
>> That can also be done in the next iteration, though.
>>
>
> I think this is best saved for another patch since it involves modifying
> the snix code. I agree that it is a good idea.
OK.
>>> +(define (factorize-uri uri version)
>>> + "Factorize URI, a package tarball URI as a string, such that any occurrences
>>> +of the string VERSION is replaced by the symbol 'version."
>>
>> This one from snix is redundant with ‘tarball-url->string-append’ (and
>> maybe less sophisticated?).
>>
>
> 'factorize-uri' is better, so I'm using that now. I created a new
> module '(guix import utils)' for commonly used import procedures.
>
> New patch attached.
Perfect, OK to push!
Ludo’.
prev parent reply other threads:[~2014-09-29 7:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-27 21:15 [PATCH] import: Add PyPI importer David Thompson
2014-09-27 21:19 ` David Thompson
2014-09-27 21:35 ` Ludovic Courtès
2014-09-29 11:23 ` David Thompson
2014-09-29 12:24 ` Ludovic Courtès
2014-09-29 23:31 ` David Thompson
2014-09-30 5:49 ` Alex Kost
2014-09-30 7:13 ` Ludovic Courtès
2014-09-30 11:55 ` David Thompson
2014-09-27 21:49 ` Ludovic Courtès
2014-09-28 23:48 ` David Thompson
2014-09-29 7:04 ` Ludovic Courtès [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r3yu29gq.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=dthompson2@worcester.edu \
--cc=guix-devel@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).