Skip to contentSkip to conversation

pypi: update the pypi class to support the updated URL scheme

PATCH New Derek Straka 1 participant 2 messages May 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pypi: update the pypi class to support the updated URL scheme

pypi has changed the url scheme to use the blake2b rather than names

http://permalink.gmane.org/gmane.linux.distributions.nixos/20158

---
 meta-python/classes/pypi.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-python/classes/pypi.bbclass +5 -1
index 659e1c0..5b96c01 100644
@@ -12,8 +12,12 @@ PYPI_PACKAGE_EXT ?= "tar.gz"
 def pypi_src_uri(d):
     package = d.getVar('PYPI_PACKAGE', True)
     package_ext = d.getVar('PYPI_PACKAGE_EXT', True)
+    package_hash = d.getVar('PYPI_PACKAGE_HASH', True)
     pv = d.getVar('PV', True)
-    return 'https://pypi.python.org/packages/source/%s/%s/%s-%s.%s' % (package[0], package, package, pv, package_ext)
+    if package_hash:
+        return 'https://pypi.python.org/packages/%s/%s/%s/%s-%s.%s' % ( package_hash[:2], package_hash[2:4], package_hash[4:], package, pv, package_ext)
+    else:
+        return 'https://pypi.python.org/packages/source/%s/%s/%s-%s.%s' % (package[0], package, package, pv, package_ext)
 
 PYPI_SRC_URI ?= "${@pypi_src_uri(d)}"
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 python-dateutil: update to version 2.5.3

---
 meta-python/recipes-devtools/python/python-dateutil.inc              | 5 +++--
 .../python/{python-dateutil_2.5.2.bb => python-dateutil_2.5.3.bb}    | 0
 .../python/{python3-dateutil_2.5.2.bb => python3-dateutil_2.5.3.bb}  | 0
 3 files changed, 3 insertions(+), 2 deletions(-)
 rename meta-python/recipes-devtools/python/{python-dateutil_2.5.2.bb => python-dateutil_2.5.3.bb} (100%)
 rename meta-python/recipes-devtools/python/{python3-dateutil_2.5.2.bb => python3-dateutil_2.5.3.bb} (100%)
meta-python/recipes-devtools/python/python-dateutil.inc +3 -2
index a944ef2..797234b 100644
@@ -5,10 +5,11 @@ LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=51430b33c900f45f999c459ee29ca493"
 PR = "r0"
 
-SRC_URI[md5sum] = "eafe168e8f404bf384514f5116eedbb6"
-SRC_URI[sha256sum] = "063907ef47f6e187b8fe0728952e4effb587a34f2dc356888646f9b71fbb2e4b"
+SRC_URI[md5sum] = "05ffc6d2cc85a7fd93bb245807f715ef"
+SRC_URI[sha256sum] = "1408fdb07c6a1fa9997567ce3fcee6a337b39a503d80699e0f213de4aa4b32ed"
 
 PYPI_PACKAGE = "python-dateutil"
+PYPI_PACKAGE_HASH = "3ef5aad82824b369332a676a90a8c0d1e608b17e740bbb6aeeebca726f17b902"
 inherit pypi 
 
 PACKAGES =+ "${PN}-zoneinfo"
meta-python/recipes-devtools/python/python-dateutil_2.5.3.bb renamed from meta-python/recipes-devtools/python/python-dateutil_2.5.2.bb +0 -0
similarity index 100%
rename from meta-python/recipes-devtools/python/python-dateutil_2.5.2.bb
rename to meta-python/recipes-devtools/python/python-dateutil_2.5.3.bb
meta-python/recipes-devtools/python/python3-dateutil_2.5.3.bb renamed from meta-python/recipes-devtools/python/python3-dateutil_2.5.2.bb +0 -0
similarity index 100%
rename from meta-python/recipes-devtools/python/python3-dateutil_2.5.2.bb
rename to meta-python/recipes-devtools/python/python3-dateutil_2.5.3.bb
Signature · 1 line
1.9.1