forked from pool/python-python-magic
		
	Accepting request 926972 from devel:languages:python
- Use pyunittest macro instead of the home-grown solution. - Add fix-support-file-5.41.patch to support file 5.41. OBS-URL: https://build.opensuse.org/request/show/926972 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-magic?expand=0&rev=6
This commit is contained in:
		
							
								
								
									
										13
									
								
								fix-support-file-5.41.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								fix-support-file-5.41.patch
									
									
									
									
									
										Normal file
									
								
							@@ -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',
 | 
			
		||||
@@ -1,3 +1,13 @@
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Fri Oct 22 10:09:21 UTC 2021 - Matej Cepl <mcepl@suse.com>
 | 
			
		||||
 | 
			
		||||
- Use pyunittest macro instead of the home-grown solution.
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Fri Oct 22 08:02:27 UTC 2021 - Martin Liška <mliska@suse.cz>
 | 
			
		||||
 | 
			
		||||
- Add fix-support-file-5.41.patch to support file 5.41.
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Fri Apr 16 13:00:57 UTC 2021 - Dr. Werner Fink <werner@suse.de>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
@@ -72,7 +76,7 @@ supports both textual and MIME-type output.
 | 
			
		||||
 | 
			
		||||
%check
 | 
			
		||||
export LC_ALL=en_US.UTF-8
 | 
			
		||||
%python_expand PYTHONPATH=. $python test/test.py
 | 
			
		||||
%pyunittest -v test.test
 | 
			
		||||
 | 
			
		||||
%files %{python_files}
 | 
			
		||||
%license LICENSE
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user