osc copypac from project:home:mcepl:work package:python-typing_extensions revision:3
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=2
This commit is contained in:
parent
98f73ae30a
commit
26d7a8d376
29
fix_tests.patch
Normal file
29
fix_tests.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
--- a/src_py3/test_typing_extensions.py
|
||||||
|
+++ b/src_py3/test_typing_extensions.py
|
||||||
|
@@ -31,7 +31,7 @@ except ImportError:
|
||||||
|
|
||||||
|
# We assume Python versions *below* 3.5.0 will have the most
|
||||||
|
# up-to-date version of the typing module installed. Since
|
||||||
|
-# the typing module isn't a part of the standard library in older
|
||||||
|
+# the typing module isn't a part of the standard library in older
|
||||||
|
# versions of Python, those users are likely to have a reasonably
|
||||||
|
# modern version of `typing` installed from PyPi.
|
||||||
|
TYPING_LATEST = sys.version_info[:3] < (3, 5, 0)
|
||||||
|
@@ -288,7 +288,7 @@ else:
|
||||||
|
AwaitableWrapper = AsyncIteratorWrapper = ACM = object
|
||||||
|
|
||||||
|
PY36_TESTS = """
|
||||||
|
-from test import ann_module, ann_module2, ann_module3
|
||||||
|
+import ann_module, ann_module2, ann_module3
|
||||||
|
from typing_extensions import AsyncContextManager
|
||||||
|
from typing import NamedTuple
|
||||||
|
|
||||||
|
@@ -1313,7 +1313,7 @@ class AllTests(BaseTestCase):
|
||||||
|
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('python3 -OO {}'.format(file_path),
|
||||||
|
stderr=subprocess.STDOUT,
|
||||||
|
shell=True)
|
||||||
|
except subprocess.CalledProcessError:
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-typing-extensions
|
# spec file for package python-typing_extensions
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -12,7 +12,9 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%define modname typing_extensions
|
%define modname typing_extensions
|
||||||
@ -20,16 +22,23 @@
|
|||||||
Name: python-typing_extensions
|
Name: python-typing_extensions
|
||||||
Version: 3.6.6
|
Version: 3.6.6
|
||||||
Release: 0
|
Release: 0
|
||||||
License: Python-2.0
|
|
||||||
Summary: Backported and Experimental Type Hints for Python 35+
|
Summary: Backported and Experimental Type Hints for Python 35+
|
||||||
Url: https://github.com/python/typing/
|
License: Python-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: https://files.pythonhosted.org/packages/source/t/%{modname}/%{modname}-%{version}.tar.gz
|
URL: https://github.com/python/typing/
|
||||||
BuildRequires: python-rpm-macros
|
Source0: https://files.pythonhosted.org/packages/source/t/typing_extensions/%{modname}-%{version}.tar.gz
|
||||||
|
Source1: test_modules.tar.gz
|
||||||
|
Patch0: fix_tests.patch
|
||||||
|
BuildRequires: %{python_module flake8-bugbear}
|
||||||
|
BuildRequires: %{python_module flake8-pyi}
|
||||||
|
BuildRequires: %{python_module flake8}
|
||||||
|
BuildRequires: %{python_module pytest >= 3.0}
|
||||||
|
BuildRequires: %{python_module pytest-cov >= 2.4.0}
|
||||||
|
BuildRequires: %{python_module pytest-xdist >= 1.18}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -49,9 +58,9 @@ the ``typing`` module from PyPi instead of using this one unless
|
|||||||
specifically writing code that must be compatible with multiple
|
specifically writing code that must be compatible with multiple
|
||||||
Python versions or requires experimental types.
|
Python versions or requires experimental types.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{modname}-%{version}
|
%setup -q -n %{modname}-%{version}
|
||||||
|
%autopatch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -61,10 +70,13 @@ Python versions or requires experimental types.
|
|||||||
%fdupes %{buildroot}%{python3_sitelib}
|
%fdupes %{buildroot}%{python3_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_exec setup.py test
|
cd src_py3
|
||||||
|
tar xvf %{SOURCE1}
|
||||||
|
%__python3 test_typing_extensions.py
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc LICENSE README.rst
|
%license LICENSE
|
||||||
|
%doc README.rst
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
3
test_modules.tar.gz
Normal file
3
test_modules.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:197b3c64106db87f9f11522e24307125038bd38b0acd7ad7b3b64c1423d48e03
|
||||||
|
size 17042
|
Loading…
Reference in New Issue
Block a user