diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/funcsigs | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/funcsigs')
-rw-r--r-- | dev-python/funcsigs/Manifest | 6 | ||||
-rw-r--r-- | dev-python/funcsigs/files/funcsigs-1.0.2-fix-pypy3-tests.patch | 94 | ||||
-rw-r--r-- | dev-python/funcsigs/funcsigs-0.4.ebuild | 26 | ||||
-rw-r--r-- | dev-python/funcsigs/funcsigs-1.0.2-r1.ebuild | 32 | ||||
-rw-r--r-- | dev-python/funcsigs/metadata.xml | 11 |
5 files changed, 169 insertions, 0 deletions
diff --git a/dev-python/funcsigs/Manifest b/dev-python/funcsigs/Manifest new file mode 100644 index 000000000000..660caa16bb38 --- /dev/null +++ b/dev-python/funcsigs/Manifest @@ -0,0 +1,6 @@ +AUX funcsigs-1.0.2-fix-pypy3-tests.patch 3154 BLAKE2B face7accdd8bc2c5d3ab9dbcf9fa172695901768849d9278b0b384819b4c6ca3409f8dba3d9ce058f16e88f0696d1fd7dd6d3b7ba119989fb8b3e97fa0399635 SHA512 f4f93b2587fe2b0a41dda070d827f663785c367fcb3a181c0f461175ebeff47147907cc901954cb98cb7cce25754535663fbefe9227462fa2963d3ed572a852a +DIST funcsigs-0.4.tar.gz 25697 BLAKE2B 0b57ac0ce3aa8ff16724af9be94f297c15c94ed9083e2dd78796f134054db0e5f8213d1671352e0122a90bb2e8da78937c7a44f2e231b64de29afbb0dcf8b6d5 SHA512 64d821e94049ae906b9e5c8a2590f80a7d1d819554258e20f4170207576e5c8f65d32759a3f65bcb05fe721fa502658ff5767cd435932ea926c792c62ebe96d5 +DIST funcsigs-1.0.2.tar.gz 27947 BLAKE2B 3006d46018ae040b930e397c3f11575ae0ef18a8b2c9b6c10075804d83d23bea1fb81179de85180146673e0bd4c775a68c0ff624cdaceb1894efe5b2c8fd753c SHA512 4e583bb7081bb1d6c0fe5a6935ca03032d562b93ef5c11b51a72ce9e7ac12902451cc2233c7e6f70440629d88d8e6e9625965ee408100b80b0024f3a6204afda +EBUILD funcsigs-0.4.ebuild 645 BLAKE2B 6a24bab1b1d13f1a234e56f8a6ee5e50b418347f6efd3208949f1c9c5aee771028fc1d24df5c31ec9618050bb044a0d1c8e451c6783bdecd9c61bb2d0ec98da7 SHA512 a23d3c084c6d5f9893cecc4e82c2598d4e116cf0763229d75658ef23ab8669d3869d30ff864f53520cbdb22e2359d66b6124aae80cb5458972d40ca117eb0014 +EBUILD funcsigs-1.0.2-r1.ebuild 891 BLAKE2B 3b3d92a9a84329f80702ba3d3c354d98c53e6d26f92711af15bd3b5486ea886a7dd96ead2fdabf88ead2eb5909fbcfa0ddf66cea163cbec52176e204ebd305ce SHA512 a9835de88cc6b1a439c1b4752c4b2ed1331333f427e8e32ab142c18629da5ed3b3d7ddae148c20ef60c69d2f4b29cd017bd65426e509ccd44e6953fb0eba111e +MISC metadata.xml 321 BLAKE2B 8aa6245455756e5d3a197dfb37bb706551ff8ea0c6beb047d0c59c54d2ed74853e6d9857d37a531a5313a7a85a0849f5e0b308a58fa98a3cce6040b5b91a1a80 SHA512 a3df23a85e33881f6ac0da0b0e33fd69de760c79e636574982606964134d303bfa219f429006a54ad71622c05c07b6eb233a1e8918f4703257b0e8c389acb6d8 diff --git a/dev-python/funcsigs/files/funcsigs-1.0.2-fix-pypy3-tests.patch b/dev-python/funcsigs/files/funcsigs-1.0.2-fix-pypy3-tests.patch new file mode 100644 index 000000000000..f4ecec3b6137 --- /dev/null +++ b/dev-python/funcsigs/files/funcsigs-1.0.2-fix-pypy3-tests.patch @@ -0,0 +1,94 @@ +diff --git a/tests/test_inspect.py b/tests/test_inspect.py +index 98d6592..3a2a1f2 100644 +--- a/tests/test_inspect.py ++++ b/tests/test_inspect.py +@@ -8,6 +8,7 @@ import unittest2 as unittest + + import funcsigs as inspect + ++import platform + + class TestSignatureObject(unittest.TestCase): + @staticmethod +@@ -409,7 +410,7 @@ def test_signature_on_decorated(self): + Ellipsis)) + """) + +- if sys.version_info[0] > 2: ++ if sys.version_info[0] > 2 and platform.python_implementation() != "PyPy": + exec(""" + def test_signature_on_class(self): + class C: +@@ -493,41 +494,44 @@ def test_signature_on_class(self): + Ellipsis)) + """) + +- def test_signature_on_callable_objects(self): +- class Foo(object): +- def __call__(self, a): +- pass ++ if platform.python_implementation() != "PyPy": ++ exec(""" ++def test_signature_on_callable_objects(self): ++ class Foo(object): ++ def __call__(self, a): ++ pass + +- self.assertEqual(self.signature(Foo()), +- ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),), +- Ellipsis)) ++ self.assertEqual(self.signature(Foo()), ++ ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),), ++ Ellipsis)) + +- class Spam(object): +- pass +- with self.assertRaisesRegex(TypeError, "is not a callable object"): +- inspect.signature(Spam()) ++ class Spam(object): ++ pass ++ with self.assertRaisesRegex(TypeError, "is not a callable object"): ++ inspect.signature(Spam()) + +- class Bar(Spam, Foo): +- pass ++ class Bar(Spam, Foo): ++ pass + +- self.assertEqual(self.signature(Bar()), +- ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),), +- Ellipsis)) ++ self.assertEqual(self.signature(Bar()), ++ ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),), ++ Ellipsis)) + +- class ToFail(object): +- __call__ = type +- with self.assertRaisesRegex(ValueError, "not supported by signature"): +- inspect.signature(ToFail()) ++ class ToFail(object): ++ __call__ = type ++ with self.assertRaisesRegex(ValueError, "not supported by signature"): ++ inspect.signature(ToFail()) + +- if sys.version_info[0] < 3: +- return ++ if sys.version_info[0] < 3: ++ return + +- class Wrapped(object): +- pass +- Wrapped.__wrapped__ = lambda a: None +- self.assertEqual(self.signature(Wrapped), +- ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),), +- Ellipsis)) ++ class Wrapped(object): ++ pass ++ Wrapped.__wrapped__ = lambda a: None ++ self.assertEqual(self.signature(Wrapped), ++ ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),), ++ Ellipsis)) ++""") + + def test_signature_on_lambdas(self): + self.assertEqual(self.signature((lambda a=10: a)), diff --git a/dev-python/funcsigs/funcsigs-0.4.ebuild b/dev-python/funcsigs/funcsigs-0.4.ebuild new file mode 100644 index 000000000000..b9a168f60dff --- /dev/null +++ b/dev-python/funcsigs/funcsigs-0.4.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Python function signatures from PEP362 for Python 2.7" +HOMEPAGE="https://pypi.org/project/funcsigs/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +SLOT="0" +LICENSE="Apache-2.0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux" +IUSE="test" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/unittest2[${PYTHON_USEDEP}] )" +RDEPEND="" + +python_test() { + esetup.py test +} diff --git a/dev-python/funcsigs/funcsigs-1.0.2-r1.ebuild b/dev-python/funcsigs/funcsigs-1.0.2-r1.ebuild new file mode 100644 index 000000000000..9d4466231cf6 --- /dev/null +++ b/dev-python/funcsigs/funcsigs-1.0.2-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy{,3} ) + +inherit distutils-r1 + +DESCRIPTION="Python function signatures backport from PEP362 for Python 2.7-3.5" +HOMEPAGE="https://pypi.org/project/funcsigs/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +SLOT="0" +LICENSE="Apache-2.0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux" +IUSE="test" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/unittest2[${PYTHON_USEDEP}] )" + +PATCHES=( + # This patch disables some tests for pypy as they do not work as expected. + # This has been reported upstream + # https://github.com/testing-cabal/funcsigs/issues/10 + "${FILESDIR}/${P}-fix-pypy3-tests.patch" +) + +python_test() { + esetup.py test +} diff --git a/dev-python/funcsigs/metadata.xml b/dev-python/funcsigs/metadata.xml new file mode 100644 index 000000000000..bb74f00502a5 --- /dev/null +++ b/dev-python/funcsigs/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="pypi">funcsigs</remote-id> + </upstream> +</pkgmetadata> |