Inital packaging

This commit is contained in:
Jonny Heggheim 2019-04-02 19:29:54 +02:00
parent 88f51fa8de
commit 56678ca424
No known key found for this signature in database
GPG Key ID: 559BD2ED3E26795A
4 changed files with 119 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/typing_extensions-3.7.2.tar.gz

View File

@ -0,0 +1,39 @@
From 1f49677868a60ed697b0eafb2fb56471233b4ea5 Mon Sep 17 00:00:00 2001
From: "Michael R. Crusoe" <1330696+mr-c@users.noreply.github.com>
Date: Thu, 14 Feb 2019 12:25:27 +0200
Subject: [PATCH] Run the tests using the current Python executable (#615)
Not whatever "python" might be.
---
typing_extensions/src_py2/test_typing_extensions.py | 3 ++-
typing_extensions/src_py3/test_typing_extensions.py | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/typing_extensions/src_py2/test_typing_extensions.py b/typing_extensions/src_py2/test_typing_extensions.py
index eb5acf3..922d8cd 100644
--- a/typing_extensions/src_py2/test_typing_extensions.py
+++ b/typing_extensions/src_py2/test_typing_extensions.py
@@ -860,7 +860,8 @@ def test_typing_extensions_compiles_with_opt(self):
file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'typing_extensions.py')
try:
- subprocess.check_output('python -OO {}'.format(file_path),
+ subprocess.check_output('{} -OO {}'.format(sys.executable,
+ file_path),
stderr=subprocess.STDOUT,
shell=True)
except subprocess.CalledProcessError:
diff --git a/typing_extensions/src_py3/test_typing_extensions.py b/typing_extensions/src_py3/test_typing_extensions.py
index eb0c64f..815e425 100644
--- a/typing_extensions/src_py3/test_typing_extensions.py
+++ b/typing_extensions/src_py3/test_typing_extensions.py
@@ -1389,7 +1389,8 @@ def test_typing_extensions_compiles_with_opt(self):
file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'typing_extensions.py')
try:
- subprocess.check_output('python -OO {}'.format(file_path),
+ subprocess.check_output('{} -OO {}'.format(sys.executable,
+ file_path),
stderr=subprocess.STDOUT,
shell=True)
except subprocess.CalledProcessError:

View File

@ -0,0 +1,78 @@
%global srcname typing_extensions
Name: python-typing-extensions
Version: 3.7.2
Release: 1%{?dist}
Summary: Python Typing Extensions
License: Python
URL: https://pypi.org/project/typing-extensions/
Source0: %{pypi_source}
Patch0: https://github.com/python/typing/commit/1f49677868a60ed697b0eafb2fb56471233b4ea5.patch#/0001-Run-the-tests-using-the-current-Python-executable.patch
BuildArch: noarch
%description
Typing Extensions - Backported and Experimental Type Hints for Python
The typing module was added to the standard library in Python 3.5 on a
provisional basis and will no longer be provisional in Python 3.7.
However, this means users of Python 3.5 - 3.6 who are unable to upgrade will not
be able to take advantage of new types added to the typing module, such as
typing.Text or typing.Coroutine.
The typing_extensions module contains both backports of these changes as well as
experimental types that will eventually be added to the typing module, such as
Protocol.
Users of other Python versions should continue to install and use the typing
module from PyPi instead of using this one unless specifically writing code that
must be compatible with multiple Python versions or requires experimental types.
%package -n python3-typing-extensions
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-test
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-typing-extensions
Typing Extensions - Backported and Experimental Type Hints for Python
The typing module was added to the standard library in Python 3.5 on a
provisional basis and will no longer be provisional in Python 3.7.
However, this means users of Python 3.5 - 3.6 who are unable to upgrade will not
be able to take advantage of new types added to the typing module, such as
typing.Text or typing.Coroutine.
The typing_extensions module contains both backports of these changes as well as
experimental types that will eventually be added to the typing module, such as
Protocol.
Users of other Python versions should continue to install and use the typing
module from PyPi instead of using this one unless specifically writing code that
must be compatible with multiple Python versions or requires experimental types.
%prep
%autosetup -p2 -n %{srcname}-%{version}
%build
%py3_build
%install
%py3_install
%check
%{__python3} src_py3/test_typing_extensions.py
%files -n python3-typing-extensions
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{srcname}.py
%{python3_sitelib}/__pycache__/*
%changelog
* Sun Mar 31 2019 Jonny Heggheim <hegjon@gmail.com> - 3.7.2-1
- Inital packaging

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (typing_extensions-3.7.2.tar.gz) = 7f4c47d8f4e9689c73aac923043a7084372c82b634d53923172aedd03b6d952d83e4d8c7d8716582fac0411900e5cc29c863113e522e0324185aca846928a673