Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta python merge #504

Closed
wants to merge 12 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ UPSTREAM_CHECK_REGEX = "/${PYPI_PACKAGE}/(?P<pver>(2\.2\.\d*)+)/"

inherit setuptools3

SRC_URI[md5sum] = "ebf3bbb7716a7b11029e860475b9a122"
SRC_URI[sha256sum] = "3339ff0e03dee13045aef6ae7b523edff75b6d726adf7a7a48f53d5a501f7db7"
SRC_URI[sha256sum] = "b1e65eaf371347d4b13eb7e061b09786c973061de95390c327c85c1e2aa2349c"

RDEPENDS:${PN} += "\
${PYTHON_PN}-sqlparse \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RDEPENDS:${PN} = "${PYTHON_PN}-greenlet \
${PYTHON_PN}-pprint \
"

SRC_URI[sha256sum] = "43e93e1a4738c922a2416baf33f0afb0a20b22d3dba886720bc037cd02a98575"
SRC_URI[sha256sum] = "f48b64578c367b91fa793bf8eaaaf4995cb93c8bc45860e473bf868070ad094e"

inherit pypi setuptools3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b0b7ac63b60085b23fa9f7e1951daa1d"

PYPI_PACKAGE = "python-gnupg"
SRC_URI[sha256sum] = "2061f56b1942c29b92727bf9aecbd3cea3893acc9cccbdc7eb4604285efe4ac7"
SRC_URI[sha256sum] = "b64de1ae5cedf872b437201a566fa2c62ce0c95ea2e30177eb53aee1258507d7"

inherit pypi setuptools3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7ca

inherit pypi setuptools3

SRC_URI[sha256sum] = "a88ee8903aa0a81f6c3cec2d5cf62d3c8aa67c06439b0496b49048fb1854ebf4"
SRC_URI[sha256sum] = "a4031d6ec6c2b1b6dc3e0be7e10a1bd72fb0b18b07ef9be7b51f2c1004ce2437"

RDEPENDS:${PN} += "\
${PYTHON_PN}-grpcio \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOMEPAGE = "https://graphviz.readthedocs.io/en/stable/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=87cd8818b7e63c6a9c580034e80d7521"

SRC_URI[sha256sum] = "b42554a1c47f24a9473b7f4e380d17b228586a067c97ea69d5354d6074be8dfd"
SRC_URI[sha256sum] = "09ed0cde452d015fe77c4845a210eb642f28d245f5bc250d4b97808cb8f49078"

inherit pypi setuptools3

Expand Down
13 changes: 0 additions & 13 deletions meta-python/recipes-devtools/python/python3-icu_2.7.2.bb

This file was deleted.

15 changes: 15 additions & 0 deletions meta-python/recipes-devtools/python/python3-icu_2.8.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SUMMARY = "Python extension wrapping the ICU C++ API"
HOMEPAGE = "https://gitlab.pyicu.org/main/pyicu"
BUGTRACKER = "https://gitlab.pyicu.org/main/pyicu/-/issues"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c7c4bfd81a21e3b6368bdcced992bf59"

DEPENDS += "icu"

PYPI_PACKAGE = "PyICU"
SRC_URI[sha256sum] = "3d80de47045a8163db5aebc947c42b4d429eeea4f0c32af4f40b33981fa872b9"

SRC_URI += "file://0001-Fix-host-contamination-of-include-files.patch"

inherit pkgconfig pypi setuptools3
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSES.txt;md5=e4c045ebad958ead4b48008f70838403 \

DEPENDS += "libxml2 libxslt"

SRC_URI[sha256sum] = "39b78571b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468"
SRC_URI[sha256sum] = "a1613838aa6b89af4ba10a0f3a972836128801ed008078f8c1244e65958f1b24"

inherit pkgconfig pypi setuptools3

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Disable automatic downloading of components!

Upstream-Status: Inappropriate [disable feature]

Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>

--- a/setupext.py.orig 2021-12-14 09:44:33.499041044 -0800
+++ a/setupext.py 2021-12-14 09:45:00.447041706 -0800
@@ -64,40 +64,7 @@
BytesIO
The file loaded into memory.
"""
- cache_dir = _get_xdg_cache_dir()
-
- if cache_dir is not None: # Try to read from cache.
- try:
- data = (cache_dir / sha).read_bytes()
- except IOError:
- pass
- else:
- if _get_hash(data) == sha:
- return BytesIO(data)
-
- # jQueryUI's website blocks direct downloads from urllib.request's
- # default User-Agent, but not (for example) wget; so I don't feel too
- # bad passing in an empty User-Agent.
- with urllib.request.urlopen(
- urllib.request.Request(url, headers={"User-Agent": ""}),
- context=_get_ssl_context()) as req:
- data = req.read()
-
- file_sha = _get_hash(data)
- if file_sha != sha:
- raise Exception(
- f"The downloaded file does not match the expected sha. {url} was "
- f"expected to have {sha} but it had {file_sha}")
-
- if cache_dir is not None: # Try to cache the downloaded file.
- try:
- cache_dir.mkdir(parents=True, exist_ok=True)
- with open(cache_dir / sha, "xb") as fout:
- fout.write(data)
- except IOError:
- pass
-
- return BytesIO(data)
+ raise IOError(f"Automatic downloading is disabled.")


def get_and_extract_tarball(urls, sha, dirname):
22 changes: 17 additions & 5 deletions meta-python/recipes-devtools/python/python3-matplotlib_3.5.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ SRC_URI[sha256sum] = "b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a8172322

inherit pypi setuptools3 pkgconfig

# Stop the component from attempting to download when it detects a missing
# dependency
SRC_URI += "file://matplotlib-disable-download.patch"

# This python module requires a full copy of freetype-2.6.1
SRC_URI += "https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz;name=freetype;subdir=matplotlib-${PV}/build"
SRC_URI[freetype.sha256sum] = "0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014"

# This python module requires a full copy of 'qhull-2020'
SRC_URI += "http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz;name=qhull;subdir=matplotlib-${PV}/build"
SRC_URI[qhull.sha256sum] = "b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e"

# LTO with clang needs lld
LDFLAGS:append:toolchain-clang = " -fuse-ld=lld"
LDFLAGS:remove:toolchain-clang:mips = "-fuse-ld=lld"
Expand All @@ -40,12 +52,12 @@ RDEPENDS:${PN} = "\
${PYTHON_PN}-pytz \
"

ENABLELTO:toolchain-clang:riscv64 = "echo enable_lto = False >> ${S}/setup.cfg"
ENABLELTO:toolchain-clang:riscv32 = "echo enable_lto = False >> ${S}/setup.cfg"
ENABLELTO:toolchain-clang:mips = "echo enable_lto = False >> ${S}/setup.cfg"
ENABLELTO:toolchain-clang:riscv64 = "echo enable_lto = False >> ${S}/mplsetup.cfg"
ENABLELTO:toolchain-clang:riscv32 = "echo enable_lto = False >> ${S}/mplsetup.cfg"
ENABLELTO:toolchain-clang:mips = "echo enable_lto = False >> ${S}/mplsetup.cfg"
do_compile:prepend() {
echo [libs] > ${S}/setup.cfg
echo system_freetype = true >> ${S}/setup.cfg
echo [libs] > ${S}/mplsetup.cfg
echo system_freetype = True >> ${S}/mplsetup.cfg
${ENABLELTO}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/balloob/pychromecast"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1dbd4e85f47b389bdadee9c694669f5"

SRC_URI[sha256sum] = "ff6e196bd8d46ce648eb3739f3ab04168e287b167fc82abe1216d8fca21772f7"
SRC_URI[sha256sum] = "33a47d551ae8b6f93129564828e72e7f4dcb26c9f8812328870cf300ee45438f"

PYPI_PACKAGE = "PyChromecast"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
DESCRIPTION = "Bindings for the scrypt key derivation function library"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2ddf47d0ff1849bce3257ccbc1fd275c"
LIC_FILES_CHKSUM = "file://LICENSE;md5=05b5ac2824a7ae7489193b0f6a6f2cd1"
HOMEPAGE="https://github.com/holgern/py-scrypt"

SRC_URI += "file://0001-py-scrypt-remove-the-hard-coded-include-paths.patch"

SRC_URI[sha256sum] = "bcf04257af12e6d52974d177a7b08e314b66f350a73f9b6f7b232d69a6a1e041"
SRC_URI[sha256sum] = "ad143035ae0cf5e97c4b399f4e4686adf442c5f0f06f9f198a0cc6c091335fb7"

inherit pypi ptest setuptools3 dos2unix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DESCRIPTION = "Python module to support twitter API"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"

SRC_URI[sha256sum] = "88e2938de5ac7043c9ba8b8358996fbc5806059d63c96269d22527a40ca7d511"
SRC_URI[sha256sum] = "8d4b4520271b796fa7efc4c5d5ef3228af4d79f6a4d3ace3900b2778ed8f6f1c"

PYPI_PACKAGE = "tweepy"

Expand Down