From 0f1369b1e7b993e747e81a65a89ef187e51bfe67ed75f31ce01b8ed362c071e3 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 22 Oct 2021 10:05:08 +0000 Subject: [PATCH] Accepting request 926913 from home:marxin:branches:devel:languages:python - Add fix-support-file-5.41.patch to support file 5.41. OBS-URL: https://build.opensuse.org/request/show/926913 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-magic?expand=0&rev=17 --- fix-support-file-5.41.patch | 13 +++++++++++++ python-python-magic.changes | 5 +++++ python-python-magic.spec | 4 ++++ 3 files changed, 22 insertions(+) create mode 100644 fix-support-file-5.41.patch diff --git a/fix-support-file-5.41.patch b/fix-support-file-5.41.patch new file mode 100644 index 0000000..f5293bd --- /dev/null +++ b/fix-support-file-5.41.patch @@ -0,0 +1,13 @@ +diff --git a/test/test.py b/test/test.py +index 8ea9138..968f904 100755 +--- a/test/test.py ++++ b/test/test.py +@@ -70,7 +70,7 @@ class MagicTest(unittest.TestCase): + try: + m = magic.Magic(mime=True) + self.assert_values(m, { +- 'magic._pyc_': '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', diff --git a/python-python-magic.changes b/python-python-magic.changes index c1efe1a..d25ae01 100644 --- a/python-python-magic.changes +++ b/python-python-magic.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 22 08:02:27 UTC 2021 - Martin Liška + +- Add fix-support-file-5.41.patch to support file 5.41. + ------------------------------------------------------------------- Fri Apr 16 13:00:57 UTC 2021 - Dr. Werner Fink diff --git a/python-python-magic.spec b/python-python-magic.spec index b62c851..e700aa5 100644 --- a/python-python-magic.spec +++ b/python-python-magic.spec @@ -30,6 +30,7 @@ Source: https://github.com/ahupp/python-magic/archive/%{version}.tar.gz Patch0: fix-test.patch Patch1: fix-test-tumbleweed.patch Patch2: fix-4-file-5.40.patch +Patch3: fix-support-file-5.41.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: file @@ -62,6 +63,9 @@ supports both textual and MIME-type output. %if %{?pkg_vcmp:%{pkg_vcmp file >= 5.40}}%{!?pkg_vcmp:0} %patch2 -p0 %endif +%if %{?pkg_vcmp:%{pkg_vcmp file >= 5.41}}%{!?pkg_vcmp:0} +%patch3 -p1 +%endif %build %python_build