[Git][reproducible-builds/diffoscope][master] 4 commits: use extras_require.json instead of pep517 + pip [closes #325]
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Fri Jan 20 17:01:34 UTC 2023
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
d5d616ae by FC Stegerman at 2023-01-20T03:47:15+01:00
use extras_require.json instead of pep517 + pip [closes #325]
- - - - -
7129af15 by Chris Lamb at 2023-01-20T08:51:06-08:00
Comment and tidy extras_require.json handling.
- - - - -
7a1dc409 by Chris Lamb at 2023-01-20T08:51:21-08:00
No need for "from __future__ import print_function" import anymore.
- - - - -
fcad751d by Chris Lamb at 2023-01-20T08:56:26-08:00
releasing package diffoscope version 233
- - - - -
7 changed files:
- MANIFEST.in
- debian/changelog
- debian/control
- debian/tests/generate-recommends.py
- diffoscope/__init__.py
- + extras_require.json
- setup.py
Changes:
=====================================
MANIFEST.in
=====================================
@@ -1,5 +1,6 @@
include COPYING
include README.rst
include CONTRIBUTING.md
+include extras_require.json
include pyproject.toml
graft tests
=====================================
debian/changelog
=====================================
@@ -1,8 +1,23 @@
-diffoscope (233) UNRELEASED; urgency=medium
+diffoscope (233) unstable; urgency=medium
- * WIP (generated upon release).
+ [ FC Stegerman ]
+ * Split packaging metadata into an extras_require.json file instead of using
+ the pep517 and the pip modules directly. This was causing build failures if
+ not using a virtualenv and/or building without internet access.
+ (Closes: #1029066, reproducible-builds/diffoscope#325)
+
+ [ Vagrant Cascadian ]
+ * Add an external tool reference for GNU Guix (lzip).
+ * Drop an external tool reference for GNU Guix (pedump).
+
+ [ Chris Lamb ]
+ * Split inline Python code in shell script to generate test dependencies to a
+ separate Python script.
+ * No need for "from __future__ import print_function" import in setup.py
+ anymore.
+ * Comment and tidy the new extras_require.json handling.
- -- Chris Lamb <lamby at debian.org> Fri, 13 Jan 2023 07:06:45 +0000
+ -- Chris Lamb <lamby at debian.org> Fri, 20 Jan 2023 08:56:22 -0800
diffoscope (232) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -73,8 +73,6 @@ Build-Depends:
python3-libarchive-c,
python3-magic,
python3-pdfminer <!nocheck>,
- python3-pep517,
- python3-pip,
python3-progressbar <!nocheck>,
python3-pypdf2 <!nocheck>,
python3-pytest <!nocheck>,
=====================================
debian/tests/generate-recommends.py
=====================================
@@ -1,15 +1,12 @@
#!/usr/bin/env python3
-from pep517 import meta
+import json
-from pip._internal.req.constructors import install_req_from_req_string
+# Load extras_require dict from external JSON file. This allows it to be easily
+# shared by the main setup.py script.
+with open("extras_require.json") as f:
+ extras_require = json.load(f)
-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
-)
+xs = set(f"python3-{x}" for reqs in extras_require.values() for x in reqs)
print(", ".join(sorted(xs)))
=====================================
diffoscope/__init__.py
=====================================
@@ -17,4 +17,4 @@
# You should have received a copy of the GNU General Public License
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
-VERSION = "232"
+VERSION = "233"
=====================================
extras_require.json
=====================================
@@ -0,0 +1,21 @@
+{
+ "distro_detection": [
+ "distro"
+ ],
+ "cmdline": [
+ "argcomplete",
+ "progressbar"
+ ],
+ "comparators": [
+ "androguard",
+ "binwalk",
+ "defusedxml",
+ "guestfs",
+ "jsondiff",
+ "python-debian",
+ "pypdf",
+ "pyxattr",
+ "rpm-python",
+ "tlsh"
+ ]
+}
=====================================
setup.py
=====================================
@@ -1,9 +1,8 @@
#!/usr/bin/env python3
-from __future__ import print_function
-
-import sys
import diffoscope
+import json
+import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
@@ -34,6 +33,11 @@ class PyTest(TestCommand):
sys.exit(errno)
+# Load extras_require dict from external JSON file. This allows it to be easily
+# shared by the debian/tests/generate-recommends.py script.
+with open("extras_require.json") as f:
+ extras_require = json.load(f)
+
setup(
name="diffoscope",
version=diffoscope.VERSION,
@@ -56,22 +60,7 @@ setup(
"python-magic",
"libarchive-c",
],
- extras_require={
- "distro_detection": ["distro"],
- "cmdline": ["argcomplete", "progressbar"],
- "comparators": [
- "androguard",
- "binwalk",
- "defusedxml",
- "guestfs",
- "jsondiff",
- "python-debian",
- "pypdf",
- "pyxattr",
- "rpm-python",
- "tlsh",
- ],
- },
+ extras_require=extras_require,
python_requires=">=3.7",
classifiers=[
"Development Status :: 3 - Alpha",
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/c341b63a4c8cfe56be883b43b4e4faff71fc060e...fcad751d6f32f385efa0bcff049a913812a78f8b
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/c341b63a4c8cfe56be883b43b4e4faff71fc060e...fcad751d6f32f385efa0bcff049a913812a78f8b
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/36b0df10/attachment.htm>
More information about the rb-commits
mailing list