Skip to contentSkip to conversation

python3-matplotlib: Do not use setuptools_scm_git_archive

PATCH In review Khem Raj 2 participants 4 messages Jan 11, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 python3-matplotlib: Do not use setuptools_scm_git_archive

this gets invoked during compile task which is not disabling network access, any network activity should be explicitly enabled except during do_fetch

---
 .../matplotlib-disable-download.patch         | 20 ++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch +15 -5
index e032ceb2c9..42ffeb8970 100644
@@ -4,9 +4,19 @@ Upstream-Status: Inappropriate [disable feature]
 
 Signed-off-by: Mark Hatle <[email protected]>
 
---- 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 @@
+--- a/setup.py
++++ b/setup.py
+@@ -317,7 +317,6 @@ setup(  # Finally, pass this all along t
+         "certifi>=2020.06.20",
+         "numpy>=1.17",
+         "setuptools_scm>=4",
+-        "setuptools_scm_git_archive",
+     ],
+     install_requires=[
+         "cycler>=0.10",
+--- a/setupext.py
++++ b/setupext.py
+@@ -64,40 +64,7 @@ def get_from_cache_or_download(url, sha)
      BytesIO
          The file loaded into memory.
      """
@@ -45,6 +55,6 @@ Signed-off-by: Mark Hatle <[email protected]>
 -
 -    return BytesIO(data)
 +    raise IOError(f"Automatic downloading is disabled.")
-
-
+ 
+ 
  def get_and_extract_tarball(urls, sha, dirname):
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/3 python3-pytest-helpers-namespace: Enable network during do_compile

This should actually be fixed in the package's build system to not do the network access during compile task. Lets workaround it for now

---
 .../python/python3-pytest-helpers-namespace_2021.4.29.bb        | 2 ++
 1 file changed, 2 insertions(+)
meta-python/recipes-devtools/python/python3-pytest-helpers-namespace_2021.4.29.bb +2 -0
index c1f9f96ff4..141f12aef7 100644
@@ -8,6 +8,8 @@ SRC_URI[sha256sum] = "183524e3db4e2a1fea92e0ca3662a624ba44c9f3568da15679d7535ba6
 
 inherit pypi setuptools3
 
+do_compile[network] = "1"
+
 DEPENDS += "\
     ${PYTHON_PN}-wheel-native \
     ${PYTHON_PN}-pip-native \
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH 3/3 influxdb: Enable network during do_compile

In reply to Khem Raj

This should actually be fixed in the package's build system to not do the network access during compile task but go modules are invoked during do_compile which needs to access the network.
Lets workaround it for now

---
 meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb +2 -0
index b2899ec381..db453c0849 100644
@@ -27,6 +27,8 @@ SRCREV = "688e697c51fd5353725da078555adbeff0363d01"
 
 inherit go-mod pkgconfig systemd update-rc.d useradd
 
+do_compile[network] = "1"
+
 USERADD_PACKAGES = "${PN}"
 USERADD_PARAM:${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb"
 
Signature · 1 line
2.34.1
#3 lore raw

Re: [oe] [meta-oe][PATCH 3/3] influxdb: Enable network during do_compile

Quoted 1 line · Khem Raj

+do_compile[network] = "1"

Can you add a comment making it clear in the recipe why this is here and that it is a short-term measure?

(ditto for the other patches)

Ross