dev-python/typing-extensions: New package, needed for aiohttp bump
authorMichał Górny <mgorny@gentoo.org>
Sun, 14 Jul 2019 10:38:55 +0000 (12:38 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sun, 14 Jul 2019 12:26:30 +0000 (14:26 +0200)
This package provides backports of 'typing' module changes from Python
3.7.  The complete 'typing' module for Python 2.7 is provided via
dev-python/typing.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/typing-extensions/Manifest [new file with mode: 0644]
dev-python/typing-extensions/metadata.xml [new file with mode: 0644]
dev-python/typing-extensions/typing-extensions-3.7.4.ebuild [new file with mode: 0644]

diff --git a/dev-python/typing-extensions/Manifest b/dev-python/typing-extensions/Manifest
new file mode 100644 (file)
index 0000000..02981da
--- /dev/null
@@ -0,0 +1 @@
+DIST typing_extensions-3.7.4.tar.gz 36058 BLAKE2B f9e5efe9a7d51beb683bd4a88d7c1cab247b2c4cfd300131591bd04837dc15af277a8725c04566b9317be577f8f11e330f2d0169b52c3e9f92a8d3140e9e69d0 SHA512 82c15e6e67dde23456c3b01705729804dc21bd2088dee3aa63e53a5e597f474d34b1a37fb16bc5e3497f93d338c0115f49a070621523fb0fa3e994632785c6d9
diff --git a/dev-python/typing-extensions/metadata.xml b/dev-python/typing-extensions/metadata.xml
new file mode 100644 (file)
index 0000000..8fac39f
--- /dev/null
@@ -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">typing</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/dev-python/typing-extensions/typing-extensions-3.7.4.ebuild b/dev-python/typing-extensions/typing-extensions-3.7.4.ebuild
new file mode 100644 (file)
index 0000000..84e9203
--- /dev/null
@@ -0,0 +1,29 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6} )
+
+inherit distutils-r1
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Type Hint extensions from Python 3.7 backported to 3.5/3.6"
+HOMEPAGE="https://pypi.org/project/typing_extensions/ https://github.com/python/typing"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="PSF-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-solaris"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND=""
+
+python_test() {
+       cd "${S}"/src_py3 || die
+       "${EPYTHON}" test_typing_extensions.py -v || die "tests failed under ${EPYTHON}"
+}