dev-python/typing-extensions: Add from Gentoo

It's from Gentoo commit 507415af96eb97babbcea8139e7a106564d9f0cc.
This commit is contained in:
Krzesimir Nowak 2023-01-24 11:22:37 +01:00
parent 0faabde57c
commit dc6cdd92b6
6 changed files with 142 additions and 0 deletions

View File

@ -0,0 +1,3 @@
DIST typing_extensions-4.3.0.gh.tar.gz 47842 BLAKE2B 23a600dcded95a1109da46537bab49a6a478c77334d7c9effe65564bf236371c413a07220df3fa1de1bd0451e90961df908e097e7c7cb6d2534102369ce2590e SHA512 3c4a9073dc89e71b8027d535853d35725163961f7feeaba817e28f93b236bcae805d9b1f6e2be8e9fc3651c283b662935ba0352e5de25ff74df4dc18373e8f7a
DIST typing_extensions-4.4.0.gh.tar.gz 50027 BLAKE2B 4cb757eadcfce85842dc5625e620f01f8fda00fe3712d5895d8b0aa07a9e649cd20f9f820cb2801e3b34c84c1d3b79d5e71fc49cd37014924825b6cdef0152c7 SHA512 1c046e6dab22fb399acf7ab8771d035aa24c88b09cbd023e80a41cd04851c5f8b1d297275012e933658e963e008b073b8d3815f5703042545b57130daa38f143
DIST typing_extensions-4.5.0.gh.tar.gz 52431 BLAKE2B 3d905e4f1146d23d00b695044daf653722fce9ade8f44730116bab0b8fb15c3e8d2124a6b0d395fad078878e0e4b7888e19660ca2491ccc9ec01dc11ce318fc8 SHA512 29369da83cdca57aba7d8c2089c77ad265eeb614fd34056f678e6dc9374558d1059ff2c514326115734fadbcad27ec98e1e5fcec087022a9d838cc2bfd1fe825

View File

@ -0,0 +1,28 @@
From 3a54ef1ff6cab8c2946a78b066fd5bba6529945a Mon Sep 17 00:00:00 2001
From: Sebastian Rittau <srittau@rittau.biz>
Date: Fri, 7 Oct 2022 14:47:24 +0200
Subject: [PATCH] Fix tests when running pypy (#84)
Also run CI against pypy and update actions.
Closes: #83
---
.github/workflows/ci.yml | 14 +++++++-------
src/test_typing_extensions.py | 4 ++++
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/test_typing_extensions.py b/src/test_typing_extensions.py
index 15b2147..7110f96 100644
--- a/src/test_typing_extensions.py
+++ b/src/test_typing_extensions.py
@@ -509,6 +509,10 @@ def blah():
blah()
+ @skipIf(
+ sys.implementation.name == "pypy",
+ "sum() and print() are not compiled in pypy"
+ )
@patch(
f"{registry_holder.__name__}._overload_registry",
defaultdict(lambda: defaultdict(dict))

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">typing-extensions</remote-id>
<remote-id type="github">python/typing_extensions</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,30 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
MY_P=${P/-/_}
DESCRIPTION="Backported and Experimental Type Hints for Python 3.7+"
HOMEPAGE="
https://pypi.org/project/typing-extensions/
https://github.com/python/typing_extensions/
"
SRC_URI="
https://github.com/python/typing_extensions/archive/${PV}.tar.gz
-> ${MY_P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}
LICENSE="PSF-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
python_test() {
cd "${S}"/src || die
"${EPYTHON}" test_typing_extensions.py -v || die "tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,36 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
MY_P=${P/-/_}
DESCRIPTION="Backported and Experimental Type Hints for Python 3.7+"
HOMEPAGE="
https://pypi.org/project/typing-extensions/
https://github.com/python/typing_extensions/
"
SRC_URI="
https://github.com/python/typing_extensions/archive/${PV}.tar.gz
-> ${MY_P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}
LICENSE="PSF-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
distutils_enable_tests unittest
PATCHES=(
"${FILESDIR}"/${P}-pypy-tests.patch
)
python_test() {
cd src || die
eunittest
}

View File

@ -0,0 +1,32 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
MY_P=${P/-/_}
DESCRIPTION="Backported and Experimental Type Hints for Python 3.7+"
HOMEPAGE="
https://pypi.org/project/typing-extensions/
https://github.com/python/typing_extensions/
"
SRC_URI="
https://github.com/python/typing_extensions/archive/${PV}.tar.gz
-> ${MY_P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}
LICENSE="PSF-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
distutils_enable_tests unittest
python_test() {
cd src || die
eunittest
}