diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-python/python-magic | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-python/python-magic')
8 files changed, 5 insertions, 208 deletions
diff --git a/dev-python/python-magic/Manifest b/dev-python/python-magic/Manifest index 4d319934b565..8b98dbd0481d 100644 --- a/dev-python/python-magic/Manifest +++ b/dev-python/python-magic/Manifest @@ -1,9 +1,3 @@ -AUX python-magic-0.4.15-fix-buffer-test.patch 2817 BLAKE2B d8eb024f3e2e3d5e5fa22f9375eb9ada1bdfbf0fecb9b501a2c2938dbfaebcdd0b853ce406536166444f3154618fbceade1940bab112433076e41edfb889a4a5 SHA512 72a9d171c7421f354c504e7a0066e7ba51feb404f28ea3dee26223d44f42ad9f41ad94c7854d81d9510df4967c8a0692664e1a5e8a1444e59fe92f137fbda35f -AUX python-magic-0.4.15-fix-gzip-test-2.patch 1060 BLAKE2B 8cf89892d316d8f9da9a0c1cc6e1699c98c9d6090d528cc724cd0e6f79534ea544af8cef62f6f8de9158ff2ba6d298fbb5998768e9cc59a22d891ce1604262ae SHA512 3928569010650ff53c84accbad94db55d79c89af1aee94c31dfaf2dff4d01952779fad8c704d6324222115ec8dc02e07e1934a7db0b2c8ee9366f64409123f3c -AUX python-magic-0.4.15-fix-gzip-test.patch 768 BLAKE2B f97629ea04b4b9ba191087fd1eb3dbb0ed10deb81428754a6edfbd48ac48e0b8ae208b7e9c16e31876d050c9935eaf48165cd97ed58eb5cb72949d0fa221a32c SHA512 790c87209c131c4e394f605669297262b91ca6034309d910902dc19e28691102df0b66cb2392fc8c21727bb16c8af9baf6a316c0b6ca29c9ba542fdb49580e2b -AUX python-magic-0.4.15-fix-jpeg-test.patch 1768 BLAKE2B 64899d227643a8a09d27e0f7cc5c80ac366cd8e0d70d4ccc076df51794cf0fac14dd1f6e4f5426fe84600bbfdf35fc8e1ea571bab7839f753720fceb575d4658 SHA512 5e31ae71c01334af8e781b2aaeb98da38a68a7772d39e5eb7b231623cb4ac66652a66888a3eae5d35b07cac3024944176a52c4ebf1336b976d68f9c558cbdef5 -DIST python-magic-0.4.15.gh.tar.gz 75476 BLAKE2B dad4973f69a21d08972e1e29bc92a51bc92f405907cc28f18eb9357029afdf9f1ba68010ce651acd821140d60dc10eb2e04138627fb19d132f185a2831fcea28 SHA512 004d6bfde52d58a9d3019ef4ff8c5b18b6a4206bf89820d3a0ae0ed78813f80dfba422aee9685528f88c990526ba65fa2153ac3b95b8863ce6cb3ebe925bd780 DIST python-magic-0.4.18.gh.tar.gz 856291 BLAKE2B 882c86d3e8995d1e1b6168637a01f4f8bc86f23390b1c67248baf46d16d574a41789938ccdf0acd83db0652678ab0fa0f6e043eb2c4a75743e5d448e80530da5 SHA512 d5f0047c7537ce0598537629c60aa708623480792d489fa003328b5c6c5b0d42748b6e996f27dc2c164c598813fcf19393567e7ea266a9f0718cf2ddafbd33ac -EBUILD python-magic-0.4.15-r1.ebuild 1179 BLAKE2B 401a4db2a9d6aefb67229c51e53da0aa9fc36ab99159c8579cdda0429b4666e880307b532eb2405c4e2b30dfe4451d600b20684f20b73b162c7833eb7e5d455d SHA512 8eed0841af63fd4290a9d391cbcb10bc4b112e89f5c4c5a24ad5c5854447c850fc7fc1e689733f3068b62dc361eed6ef0f57126441d434034c32074ec664f166 -EBUILD python-magic-0.4.18.ebuild 760 BLAKE2B d9fe02ef4c6f110cbe8bd930d5499ecd60a7a95895e70616cc8cc2416ef591398be2d95024e045bf3405f355b9c6fd3e04a888972dc622fe69f1e46ddedf97c5 SHA512 d5e76e1fdf28041a5d068321e21f0d58025286d8e9bad43210a9dd71e256e743614a09857d42d79415fe5e9293e3a806ae79fcd25b373105a3aa32d5ffabc23c -MISC metadata.xml 498 BLAKE2B 74961e260f07110e36c46b4ecba047d325fa74c5b7d45376976720cbe378d8fdac68be1075b3027dfe0b80c8b60445e2449c9d437a2e04c7e5eaadedc9ce0d6b SHA512 1e4c6799db1664066d98cce7fdc47f0397e8dd42acaa479e0610fd4273c15c5314a47289aae2a31f7157207d019069b1b322592a1825b516a66461fcefd23429 +EBUILD python-magic-0.4.18.ebuild 747 BLAKE2B a1f9decbf29900b1a33b5d1c03374b391a5fbac2660ebe441648304ffff901fb82da1dc4d14f9e19d4f068e7c4aa48e7916264b5d6da1ca048000bad5fede7eb SHA512 7d937b866c98c3838c509c9a989a7508d0c85a02ec60c2a45b7a4280576acd88a3457503a597dcc266f08ee40a908e197655155b96ab96b86f4f5352a7dfe51d +MISC metadata.xml 523 BLAKE2B 6f12df0b77967272d055c9841d681752ded29e31d7e93489403e7117f111b5cdf847675897880354c08674f15b4d33aac348f0ce8ed7f04762b471f6a3667ca8 SHA512 9e503b941a7e62f21ef1417de1659c8135249027d59961486ec128c95239f56051dac67980e728e8cba73f7160259424e3121f007692f68f9c7c13f86b5060fc diff --git a/dev-python/python-magic/files/python-magic-0.4.15-fix-buffer-test.patch b/dev-python/python-magic/files/python-magic-0.4.15-fix-buffer-test.patch deleted file mode 100644 index 75a769b6a5f5..000000000000 --- a/dev-python/python-magic/files/python-magic-0.4.15-fix-buffer-test.patch +++ /dev/null @@ -1,65 +0,0 @@ -commit acfda9c26df888741805249f3ec0f60f369fc664 -Author: Louis Sautier <sautier.louis@gmail.com> -Date: Tue Aug 14 11:14:19 2018 +0200 - - Tests: allow differences when reading a buffer or a file, fixes #173 - - Also remove the loop in order to avoid analyzing files or buffers for each - expected value, replace it with a call to assertIn(). - -diff --git a/test/test.py b/test/test.py -index addccc6..67957ee 100755 ---- a/test/test.py -+++ b/test/test.py -@@ -10,7 +10,7 @@ import magic - class MagicTest(unittest.TestCase): - TESTDATA_DIR = os.path.join(os.path.dirname(__file__), 'testdata') - -- def assert_values(self, m, expected_values): -+ def assert_values(self, m, expected_values, buf_equals_file=True): - for filename, expected_value in expected_values.items(): - try: - filename = os.path.join(self.TESTDATA_DIR, filename) -@@ -21,15 +21,16 @@ class MagicTest(unittest.TestCase): - if type(expected_value) is not tuple: - expected_value = (expected_value,) - -- for i in expected_value: -- with open(filename, 'rb') as f: -- buf_value = m.from_buffer(f.read()) -+ with open(filename, 'rb') as f: -+ buf_value = m.from_buffer(f.read()) - -- file_value = m.from_file(filename) -- if buf_value == i and file_value == i: -- break -- else: -- self.assertTrue(False, "no match for " + repr(expected_value)) -+ file_value = m.from_file(filename) -+ -+ if buf_equals_file: -+ self.assertEqual(buf_value, file_value) -+ -+ for value in (buf_value, file_value): -+ self.assertIn(value, expected_value) - - def test_from_buffer_str_and_bytes(self): - m = magic.Magic(mime=True) -@@ -62,10 +63,14 @@ class MagicTest(unittest.TestCase): - 'magic._pyc_': 'python 2.4 byte-compiled', - 'test.pdf': 'PDF document, version 1.2', - 'test.gz': -- ('gzip compressed data, was "test", from Unix, last modified: Sun Jun 29 01:32:52 2008', -- 'gzip compressed data, was "test", last modified: Sun Jun 29 01:32:52 2008, from Unix'), -+ ('gzip compressed data, was "test", from Unix, last ' -+ 'modified: Sun Jun 29 01:32:52 2008', -+ 'gzip compressed data, was "test", last modified' -+ ': Sun Jun 29 01:32:52 2008, from Unix', -+ 'gzip compressed data, was "test", last modified' -+ ': Sun Jun 29 01:32:52 2008, from Unix, original size 15'), - 'text.txt': 'ASCII text', -- }) -+ }, buf_equals_file=False) - finally: - del os.environ['TZ'] - diff --git a/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test-2.patch b/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test-2.patch deleted file mode 100644 index 4dd362ebb610..000000000000 --- a/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test-2.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 18c909c4c98463d8292a7d1733aec007f178f1e5 Mon Sep 17 00:00:00 2001 -From: Adam Hupp <adam@hupp.org> -Date: Sat, 11 Jan 2020 21:57:24 -0800 -Subject: [PATCH] Hopefully fix #105 - ---- - test/test.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/test/test.py b/test/test.py -index 62e8a03..c15227d 100755 ---- a/test/test.py -+++ b/test/test.py -@@ -78,7 +78,11 @@ def test_descriptions(self): - 'gzip compressed data, was "test", last modified' - ': Sun Jun 29 01:32:52 2008, from Unix', - 'gzip compressed data, was "test", last modified' -- ': Sun Jun 29 01:32:52 2008, from Unix, original size 15'), -+ ': Sun Jun 29 01:32:52 2008, from Unix, original size 15', -+ 'gzip compressed data, was "test", ' -+ 'last modified: Sun Jun 29 01:32:52 2008, ' -+ 'from Unix, original size modulo 2^32 15' -+ ), - 'text.txt': 'ASCII text', - }, buf_equals_file=False) - finally: diff --git a/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch b/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch deleted file mode 100644 index d48637139e2f..000000000000 --- a/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit e83487a20bacd4f9b33d0478861671bf79468f59 -Author: Louis Sautier <sautier.louis@gmail.com> -Date: Mon Aug 13 12:15:13 2018 +0200 - - Allow x-gzip as MIME type for gzip files, fixes #96 - -diff --git a/test/test.py b/test/test.py -index e29335f..e3ee703 100755 ---- a/test/test.py -+++ b/test/test.py -@@ -54,7 +54,7 @@ class MagicTest(unittest.TestCase): - self.assert_values(m, { - 'magic._pyc_': 'application/octet-stream', - 'test.pdf': 'application/pdf', -- 'test.gz': 'application/gzip', -+ 'test.gz': ('application/gzip', 'application/x-gzip'), - 'text.txt': 'text/plain', - b'\xce\xbb'.decode('utf-8'): 'text/plain', - b'\xce\xbb': 'text/plain', diff --git a/dev-python/python-magic/files/python-magic-0.4.15-fix-jpeg-test.patch b/dev-python/python-magic/files/python-magic-0.4.15-fix-jpeg-test.patch deleted file mode 100644 index 9efb34b6672e..000000000000 --- a/dev-python/python-magic/files/python-magic-0.4.15-fix-jpeg-test.patch +++ /dev/null @@ -1,49 +0,0 @@ -commit 4bda684f8b461cc1f69593799efcf6afe8397756 -Author: Adam Hupp <adam@hupp.org> -Date: Sat Dec 9 09:09:00 2017 -0800 - - fix test for xenial since travis started enabling it - -diff --git a/test/test.py b/test/test.py -index addccc6..c6e2d9c 100755 ---- a/test/test.py -+++ b/test/test.py -@@ -17,7 +17,7 @@ class MagicTest(unittest.TestCase): - except TypeError: - filename = os.path.join(self.TESTDATA_DIR.encode('utf-8'), filename) - -- -+ - if type(expected_value) is not tuple: - expected_value = (expected_value,) - -@@ -37,7 +37,7 @@ class MagicTest(unittest.TestCase): - self.assertEqual("text/x-python", m.from_buffer(s)) - b = b'#!/usr/bin/env python\nprint("foo")' - self.assertEqual("text/x-python", m.from_buffer(b)) -- -+ - def test_mime_types(self): - dest = os.path.join(MagicTest.TESTDATA_DIR, b'\xce\xbb'.decode('utf-8')) - shutil.copyfile(os.path.join(MagicTest.TESTDATA_DIR, 'lambda'), dest) -@@ -92,9 +92,9 @@ class MagicTest(unittest.TestCase): - - m = magic.Magic(mime=True) - self.assertEqual(m.from_file(filename), 'image/jpeg') -- -+ - m = magic.Magic(mime=True, keep_going=True) -- self.assertEqual(m.from_file(filename), 'image/jpeg') -+ self.assertEqual(m.from_file(filename), 'image/jpeg\\012- application/octet-stream') - - - def test_rethrow(self): -@@ -103,7 +103,7 @@ class MagicTest(unittest.TestCase): - def t(x,y): - raise magic.MagicException("passthrough") - magic.magic_buffer = t -- -+ - self.assertRaises(magic.MagicException, magic.from_buffer, "hello", True) - finally: - magic.magic_buffer = old diff --git a/dev-python/python-magic/metadata.xml b/dev-python/python-magic/metadata.xml index dd6d746af2f6..cbbc97a4c4c4 100644 --- a/dev-python/python-magic/metadata.xml +++ b/dev-python/python-magic/metadata.xml @@ -9,6 +9,7 @@ <email>python@gentoo.org</email> <name>Python</name> </maintainer> + <stabilize-allarches/> <upstream> <remote-id type="pypi">python-magic</remote-id> <remote-id type="github">ahupp/python-magic</remote-id> diff --git a/dev-python/python-magic/python-magic-0.4.15-r1.ebuild b/dev-python/python-magic/python-magic-0.4.15-r1.ebuild deleted file mode 100644 index 47ed926109ab..000000000000 --- a/dev-python/python-magic/python-magic-0.4.15-r1.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( pypy3 python{2_7,3_{6..9}} ) - -inherit distutils-r1 - -DESCRIPTION="Access the libmagic file type identification library" -HOMEPAGE="https://github.com/ahupp/python-magic" -# https://github.com/ahupp/python-magic/pull/178 -SRC_URI="https://github.com/ahupp/python-magic/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="sys-apps/file[-python]" -BDEPEND=" - test? ( sys-apps/file ) -" - -PATCHES=( - # https://github.com/ahupp/python-magic/pull/177 - "${FILESDIR}/${P}-fix-buffer-test.patch" - # https://github.com/ahupp/python-magic/pull/176 - "${FILESDIR}/${P}-fix-gzip-test.patch" - # https://github.com/ahupp/python-magic/commit/4bda684f8b461cc1f69593799efcf6afe8397756 - "${FILESDIR}/${P}-fix-jpeg-test.patch" - # https://github.com/ahupp/python-magic/commit/18c909c4c98463d8292a7d1733aec007f178f1e5 - "${FILESDIR}/${P}-fix-gzip-test-2.patch" -) - -python_test() { - "${EPYTHON}" test/test.py -v || die "Tests fail with ${EPYTHON}" -} diff --git a/dev-python/python-magic/python-magic-0.4.18.ebuild b/dev-python/python-magic/python-magic-0.4.18.ebuild index 681cb207e6ef..cba012d735ce 100644 --- a/dev-python/python-magic/python-magic-0.4.18.ebuild +++ b/dev-python/python-magic/python-magic-0.4.18.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( pypy3 python{2_7,3_{6..9}} ) +PYTHON_COMPAT=( pypy3 python3_{6..9} ) inherit distutils-r1 @@ -14,7 +14,7 @@ SRC_URI="https://github.com/ahupp/python-magic/archive/${PV}.tar.gz -> ${P}.gh.t LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux" +KEYWORDS="~alpha amd64 arm hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux" IUSE="test" RESTRICT="!test? ( test )" |