All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Add download helper for PyPi
Date: Sat, 2 Jan 2016 22:35:33 +0100	[thread overview]
Message-ID: <568842A5.6010103@mind.be> (raw)
In-Reply-To: <1451766174-7072-1-git-send-email-yegorslists@googlemail.com>

On 02-01-16 21:22, Yegor Yefremov wrote:
> PyPi has following URL structure:
> 
> https://pypi.python.org/packages/source/{first pkg name char}/{pkg name}
> 
> User only needs to pass package name to the helper. The helper itself
> extracts the first package name character and inserts it into download URL
> together with package name.
> 
> Usage example:
> 
> PYTHON_SIX_SITE = $(call pypi,six)

 The reason we introduced this variable for github was that github had changed
the direct URL a few times. For pypi, there is no such problem.

 In general, we prefer to keep things explicit, even if that is more verbose.
The $(call pypi,six) is nice and terse, but it makes it more difficult to
copy/paste the URL in your browser for instance.

 In short, I'm not too fond of this new helper.


 Regards,
 Arnout

> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
>  package/pkg-download.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/package/pkg-download.mk b/package/pkg-download.mk
> index 1332e66..caaeba5 100644
> --- a/package/pkg-download.mk
> +++ b/package/pkg-download.mk
> @@ -55,6 +55,9 @@ domainseparator = $(if $(1),$(1),/)
>  # github(user,package,version): returns site of GitHub repository
>  github = https://github.com/$(1)/$(2)/archive/$(3)
>  
> +# pypi(package): returns site of PyPi download location
> +pypi = https://pypi.python.org/packages/source/$(shell echo $(1) | cut -c1)/$(1)
> +
>  # Expressly do not check hashes for those files
>  # Exported variables default to immediately expanded in some versions of
>  # make, but we need it to be recursively-epxanded, so explicitly assign it.
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2016-01-02 21:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-02 20:22 [Buildroot] [PATCH] Add download helper for PyPi Yegor Yefremov
2016-01-02 21:35 ` Arnout Vandecappelle [this message]
2016-01-03 21:33   ` Peter Korsgaard

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=568842A5.6010103@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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.
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.