[Git][reproducible-builds/diffoscope][master] Split inline Python code to generate Recommends to a separate Python script.
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Fri Jan 20 00:32:10 UTC 2023
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
c341b63a by Chris Lamb at 2023-01-19T16:22:18-08:00
Split inline Python code to generate Recommends to a separate Python script.
- - - - -
2 changed files:
- debian/tests/control.sh
- + debian/tests/generate-recommends.py
Changes:
=====================================
debian/tests/control.sh
=====================================
@@ -12,11 +12,7 @@ cat debian/tests/control.in >> debian/tests/control.tmp
sed -i "s#%RECOMMENDS%#$(bin/diffoscope --list-debian-substvars | awk -F= '/diffoscope:Recommends/ { print $2 }')#" debian/tests/control.tmp
-sed -i "s#%PYRECOMMENDS%#$(python3 -c "from pep517 import meta; \
- from pip._internal.req.constructors import install_req_from_req_string; \
- dist = meta.load('.'); \
- print(', '.join([f'python3-{install_req_from_req_string(req).name}' for req in sorted(dist.requires) if install_req_from_req_string(req).markers]))" \
-)#" debian/tests/control.tmp
+sed -i "s#%PYRECOMMENDS%#$(debian/tests/generate-recommends.py)#" debian/tests/control.tmp
# Don't test-depend on radare2; not in bullseye for security reasons. (#950372)
sed -i "s#radare2, ##" debian/tests/control.tmp
=====================================
debian/tests/generate-recommends.py
=====================================
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+from pep517 import meta
+
+from pip._internal.req.constructors import install_req_from_req_string
+
+dist = meta.load(".")
+
+xs = set(
+ f"python3-{install_req_from_req_string(x).name}"
+ for x in dist.requires
+ if install_req_from_req_string(x).markers
+)
+
+print(", ".join(sorted(xs)))
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/c341b63a4c8cfe56be883b43b4e4faff71fc060e
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/c341b63a4c8cfe56be883b43b4e4faff71fc060e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20230120/7a29e319/attachment.htm>
More information about the rb-commits
mailing list