summaryrefslogtreecommitdiff
path: root/dev-python/funcsigs
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/funcsigs')
-rw-r--r--dev-python/funcsigs/Manifest8
-rw-r--r--dev-python/funcsigs/files/funcsigs-1.0.2-fix-pypy3-tests.patch94
-rw-r--r--dev-python/funcsigs/funcsigs-0.4.ebuild26
-rw-r--r--dev-python/funcsigs/funcsigs-1.0.2-r1.ebuild33
-rw-r--r--dev-python/funcsigs/metadata.xml11
5 files changed, 172 insertions, 0 deletions
diff --git a/dev-python/funcsigs/Manifest b/dev-python/funcsigs/Manifest
new file mode 100644
index 000000000000..7d687d49a775
--- /dev/null
+++ b/dev-python/funcsigs/Manifest
@@ -0,0 +1,8 @@
+AUX funcsigs-1.0.2-fix-pypy3-tests.patch 3154 SHA256 86ea3f2cd723774f1ac920ac9c95443c7219e90f22af7a00deb3754cdf9bf812 SHA512 f4f93b2587fe2b0a41dda070d827f663785c367fcb3a181c0f461175ebeff47147907cc901954cb98cb7cce25754535663fbefe9227462fa2963d3ed572a852a WHIRLPOOL b64cd25663a49c409d819ed27e012e8b097de5cd0e42043800a14022f98de9be77a7a153922ae518836c23e2bac78e9c085603d9cba1572ef67f2841dbd635d8
+DIST funcsigs-0.4.tar.gz 25697 SHA256 d83ce6df0b0ea6618700fe1db353526391a8a3ada1b7aba52fed7a61da772033 SHA512 64d821e94049ae906b9e5c8a2590f80a7d1d819554258e20f4170207576e5c8f65d32759a3f65bcb05fe721fa502658ff5767cd435932ea926c792c62ebe96d5 WHIRLPOOL d34cbcc061a341155b24b67af89f3fe0d14b659965ef4c9c14748996d33f3fd31d41492f097166236ebea54ea3ddd0e147c52f21f1410b2141169668811b9f66
+DIST funcsigs-1.0.2.tar.gz 27947 SHA256 a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50 SHA512 4e583bb7081bb1d6c0fe5a6935ca03032d562b93ef5c11b51a72ce9e7ac12902451cc2233c7e6f70440629d88d8e6e9625965ee408100b80b0024f3a6204afda WHIRLPOOL af07f5828aa7d3b3f403041e2f041f47f73d38da676f2da4ca8b07674c075eafde8bd1917c643bcedf49416c715f30a3d2be17783c51ef1f478d73a13ee7bc55
+EBUILD funcsigs-0.4.ebuild 648 SHA256 3812212ef5409bf027437b9f25d64ae91fd6d7f32fc9b2307483516973d4d12d SHA512 153be4574e0d49ab639c6778049faf267ef0646910da3c2034a196896edcb67afc9d07142dae276db525c65b558dfd0a4ec49991f84bd6418fc3d5921553ac4e WHIRLPOOL 50862e57c397262a0a0da95af803f1a88908563f3003f85725822b35045a7f6f85defb96239c5743e541c7005f71efdc8772a7a9adfb510b3a64441854aea512
+EBUILD funcsigs-1.0.2-r1.ebuild 893 SHA256 04e68a6519b76f6c0c42025d1f033eafa2dc93e8ee38fcd01fc41dac8fe7c059 SHA512 1b3c0b0da48cb5b19613f282e6601b578d6621d240e9121c33046207ac6018ed7323a54196d8b37168309be9885a11f4f23413e427489a577c8a31c00aee24ef WHIRLPOOL 3253ca2af2b3a16139aa9e70bb1515ca7365ecb5b7bd84793589626cc917f3bfe5c55e86ad8627bb156828f96a0a9c62bf5321f9e77b2c06ebbca40e836ee201
+MISC ChangeLog 6405 SHA256 d71b4e1b52f4eb305455d6e1b68494cbbaf31c90695ce9c1d27b44149ef803b4 SHA512 2adefff1b9a180c060bfbd72221ed13608c4435790c6bdc79fc675dbcaa0960aba44aa4708118529a002c090b2183169d241a180743986f091f721f206fdd52b WHIRLPOOL 2146adebd2219a11e946798b673b9ac52d420d114d9f09f92c7dd919dbb425709e0458fcb5216b05f02389e763ec837f8aaf26e16abdee254b1ab7e7dd6e5369
+MISC ChangeLog-2015 988 SHA256 c922db721420e55c71b112a6a0ed14d114993e3e9ee6f25f001f95fe879fe79b SHA512 0f489f69e735a4d956ebd9fdd3bf9896abe52fd187c60d5eaf743356a392a01de86ceb0ac0d99c0b1d0d4b8b66a22780cae1e9a5c7669d71615b997ae0f4fcf2 WHIRLPOOL 50cc4378112a22bb858d7bcaed51815cadf8592974d5675ec7b3c35d4e041bcee69556e711c64b687f8be423f7323609905b9f9820eda845553c8a1475fc8055
+MISC metadata.xml 321 SHA256 6f84cbe2889f895e57d4b8400078540ffbb4848a5ba392e6112b9032c4ed79a0 SHA512 a3df23a85e33881f6ac0da0b0e33fd69de760c79e636574982606964134d303bfa219f429006a54ad71622c05c07b6eb233a1e8918f4703257b0e8c389acb6d8 WHIRLPOOL a9d776ea993a03140c3a75a86ffa8e9a98586b07b04c09f2f04ee6fb772ce86a2cb1f399a86669e14f489e311ff8ec4af17c679dc8c17382333e2b270579bf96
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..5116da873ead
--- /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.python.org/pypi/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..a6926ba1f685
--- /dev/null
+++ b/dev-python/funcsigs/funcsigs-1.0.2-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy{,3} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python function signatures backport from PEP362 for Python 2.7-3.5"
+HOMEPAGE="https://pypi.python.org/pypi/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=""
+
+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>