Commits (4)
include COPYING
include README.rst
include CONTRIBUTING.md
include extras_require.json
include pyproject.toml
graft tests
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@debian.org> Fri, 13 Jan 2023 07:06:45 +0000
-- Chris Lamb <lamby@debian.org> Fri, 20 Jan 2023 08:56:22 -0800
diffoscope (232) unstable; urgency=medium
......
......@@ -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>,
......
#!/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)))
......@@ -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"
{
"distro_detection": [
"distro"
],
"cmdline": [
"argcomplete",
"progressbar"
],
"comparators": [
"androguard",
"binwalk",
"defusedxml",
"guestfs",
"jsondiff",
"python-debian",
"pypdf",
"pyxattr",
"rpm-python",
"tlsh"
]
}
#!/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",
......