Control: tags -1 = patch Hi Gianfranco,
On Sun, Mar 27, 2016 at 09:45:44PM +0000, Gianfranco Costamagna wrote: > while in general I agree about shipping both Python2 and Python3, I think > this is useful for libraries, or for core applications. In the context of > general purpose tools, such as binwalk, the probability to have it installed > in a Python3 only environment might be trascurable. > > However, that said, I had complains when I added pyqtgraph and the python-qt > dependencies, because somebody was running it on low resource systems. > > So, if you can patch and share it with me I'll be happy to apply it! > (I'm really out of time, and such features might end up in the long term > todolist) I just had a look at this, and it was easier than expected. lzma is already provided by Python 3, and lzo wasn't really a dependency of binwalk (INSTALL.md mentions it only for additional optional utilities, which were not included anyway). pyqtgraph fortunately also is already available for Python 3. Attached is a patch to build binwalk as a Python3-only package. Kind regards, Reiner
diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..9e8362f --- /dev/null +++ b/debian/clean @@ -0,0 +1 @@ +.pybuild/ diff --git a/debian/control b/debian/control index 8a80a62..e54a806 100644 --- a/debian/control +++ b/debian/control @@ -3,16 +3,16 @@ Section: devel Priority: optional Maintainer: Leo Costela <cost...@debian.org> Uploaders: Gianfranco Costamagna <locutusofb...@debian.org> -Build-Depends: debhelper (>= 9), python-all +Build-Depends: debhelper (>= 9), dh-python, python3-all, python3-setuptools Standards-Version: 3.9.6 -X-Python-Version: >= 2.7 +X-Python3-Version: >= 3.0 Homepage: https://github.com/devttys0/binwalk Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/binwalk.git Vcs-Git: git://anonscm.debian.org/collab-maint/binwalk.git Package: binwalk Architecture: all -Depends: libmagic1, python-lzma, python-lzo, ${misc:Depends}, ${python:Depends} +Depends: libmagic1, ${misc:Depends}, ${python3:Depends} Recommends: arj, bzip2, cramfsprogs, @@ -21,7 +21,7 @@ Recommends: arj, ncompress, p7zip, p7zip-full, - python-pyqtgraph, + python3-pyqtgraph, sleuthkit, squashfs-tools Description: tool for searching binary images for embedded files and executable code diff --git a/debian/rules b/debian/rules index e4553ab..db67c6c 100755 --- a/debian/rules +++ b/debian/rules @@ -3,7 +3,7 @@ # export DH_VERBOSE=1 %: - dh $@ --with python2 + dh $@ --with python3 --buildsystem=pybuild override_dh_auto_clean: - python setup.py clean + python3 setup.py clean
signature.asc
Description: PGP signature