Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Add download helper for PyPi
@ 2016-01-02 20:22 Yegor Yefremov
  2016-01-02 21:35 ` Arnout Vandecappelle
  0 siblings, 1 reply; 3+ messages in thread
From: Yegor Yefremov @ 2016-01-02 20:22 UTC (permalink / raw)
  To: buildroot

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)

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.
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-03 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-02 20:22 [Buildroot] [PATCH] Add download helper for PyPi Yegor Yefremov
2016-01-02 21:35 ` Arnout Vandecappelle
2016-01-03 21:33   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox