summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-12-16 21:10:34 +0100
committerMarius Bakke <marius@gnu.org>2021-12-16 22:21:13 +0100
commit1f4319886a9523ee46033f1d28b15f564bab4312 (patch)
tree6ce8b8849204bef17d8b656892d8bf7066e17ee7 /gnu/packages/patches
parent12c75628b4322853943ae0d0a833e371c02b97f4 (diff)
gnu: python-magic: Work around crash on .crx files.
* gnu/packages/patches/python-magic-python-bytecode.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python-xyz.scm (python-magic)[source](patches): Add it. [inputs]: Add FILE-NEXT. [arguments]: While at it, remove input labels. * gnu/packages/diffoscope.scm (diffoscope)[native-inputs]: Add FILE-NEXT.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/python-magic-python-bytecode.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-magic-python-bytecode.patch b/gnu/packages/patches/python-magic-python-bytecode.patch
new file mode 100644
index 0000000000..997fb4ee5a
--- /dev/null
+++ b/gnu/packages/patches/python-magic-python-bytecode.patch
@@ -0,0 +1,19 @@
+File 5.41 changed the MIME type of Python bytecode; adjust accordingly.
+
+Taken from upstream:
+
+ https://github.com/ahupp/python-magic/commit/0ae7e7ceac0e80e03adc75c858bb378c0427331a
+
+diff --git a/test/test.py b/test/test.py
+index 0c4621c..e443b84 100755
+--- a/test/test.py
++++ b/test/test.py
+@@ -90,7 +90,7 @@ def test_mime_types(self):
+ try:
+ m = magic.Magic(mime=True)
+ self.assert_values(m, {
+- 'magic._pyc_': ('application/octet-stream', 'text/x-bytecode.python'),
++ 'magic._pyc_': ('application/octet-stream', 'text/x-bytecode.python', 'application/x-bytecode.python'),
+ 'test.pdf': 'application/pdf',
+ 'test.gz': ('application/gzip', 'application/x-gzip'),
+ 'test.snappy.parquet': 'application/octet-stream',