Accepting request 1030938 from home:bnavigator:branches:devel:languages:python
- Clean specfile from old cruft. - Requires Python 3.7+ - Fix testsuite: Must test as module; don't need multibuild. - Update Summary and Description OBS-URL: https://build.opensuse.org/request/show/1030938 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=36
This commit is contained in:
parent
6fd66c5e61
commit
4e5a5958dd
@ -1,3 +0,0 @@
|
|||||||
<multibuild>
|
|
||||||
<package>test</package>
|
|
||||||
</multibuild>
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 24 18:14:28 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Clean specfile from old cruft.
|
||||||
|
- Requires Python 3.7+
|
||||||
|
- Fix testsuite: Must test as module; don't need multibuild.
|
||||||
|
- Update Summary and Description
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 18 12:07:27 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Tue Oct 18 12:07:27 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for python-typing_extensions
|
# spec file for package python-typing_extensions
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -16,64 +16,53 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define modname typing_extensions
|
Name: python-typing_extensions
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%bcond_without python2
|
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
|
||||||
%if "%{flavor}" == "test"
|
|
||||||
%define psuffix -test
|
|
||||||
%bcond_without test
|
|
||||||
%else
|
|
||||||
%define psuffix %{nil}
|
|
||||||
%bcond_with test
|
|
||||||
%endif
|
|
||||||
Name: python-typing_extensions%{psuffix}
|
|
||||||
Version: 4.4.0
|
Version: 4.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Backported and Experimental Type Hints for Python 35+
|
Summary: Backported and Experimental Type Hints for Python 3.7+
|
||||||
License: Python-2.0
|
License: Python-2.0
|
||||||
URL: https://github.com/python/typing/
|
URL: https://github.com/python/typing/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/t/typing_extensions/%{modname}-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/t/typing_extensions/typing_extensions-%{version}.tar.gz
|
||||||
# See https://github.com/python/typing_extensions/issues/61
|
# See https://github.com/python/typing_extensions/issues/61
|
||||||
Source1: https://raw.githubusercontent.com/python/typing_extensions/main/src/_typed_dict_test_helper.py
|
Source1: https://raw.githubusercontent.com/python/typing_extensions/%{version}/src/_typed_dict_test_helper.py
|
||||||
BuildRequires: %{python_module flit-core < 4}
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
BuildRequires: %{python_module flit-core >= 3.4}
|
BuildRequires: %{python_module flit-core >= 3.4 with %python-flit-core < 4}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module testsuite}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Provides: python-typing-extensions = %{version}
|
Provides: python-typing-extensions = %{version}-%{release}
|
||||||
%if 0%{?suse_version} > 1320 && %{with test}
|
|
||||||
BuildRequires: %{python_module testsuite}
|
|
||||||
%endif
|
|
||||||
%if %{with python2}
|
|
||||||
BuildRequires: python-typing >= 3.7.4
|
|
||||||
%endif
|
|
||||||
BuildRequires: (python3-typing >= 3.7.4 if python3-base < 3.5)
|
|
||||||
%if %{python_version_nodots} < 35
|
|
||||||
Requires: python-typing >= 3.7.4
|
|
||||||
%endif
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The ``typing`` module was added to the standard library in Python
|
The typing_extensions module serves two related purposes:
|
||||||
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
|
* Enable use of new type system features on older Python versions.
|
||||||
changes as well as experimental types that will eventually be
|
For example, typing.TypeGuard is new in Python 3.10, but
|
||||||
added to the ``typing`` module, such as ``Protocol``.
|
typing_extensions allows users on previous Python versions to use
|
||||||
|
it too.
|
||||||
|
* Enable experimentation with new type system PEPs before they are
|
||||||
|
accepted and added to the typing module.
|
||||||
|
|
||||||
Users of other Python versions should continue to install and use
|
New features may be added to typing_extensions as soon as they are
|
||||||
the ``typing`` module from PyPi instead of using this one unless
|
specified in a PEP that has been added to the python/peps repository.
|
||||||
specifically writing code that must be compatible with multiple
|
If the PEP is accepted, the feature will then be added to typing for
|
||||||
Python versions or requires experimental types.
|
the next CPython release. No typing PEP has been rejected so far, so
|
||||||
|
we haven't yet figured out how to deal with that possibility.
|
||||||
|
|
||||||
|
Starting with version 4.0.0, typing_extensions uses Semantic Versioning.
|
||||||
|
The major version is incremented for all backwards-incompatible changes.
|
||||||
|
Therefore, it's safe to depend on typing_extensions like this:
|
||||||
|
typing_extensions >=x.y, <(x+1),
|
||||||
|
where x.y is the first version that includes all features you need.
|
||||||
|
|
||||||
|
typing_extensions supports Python versions 3.7 and higher.
|
||||||
|
In the future, support for older Python versions will be dropped some time
|
||||||
|
after that version reaches end of life.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{modname}-%{version}
|
%setup -q -n typing_extensions-%{version}
|
||||||
# This should not be necessary in the next release
|
# This should not be necessary in the next release
|
||||||
if [ -f src/_typed_dict_test_helper.py ]; then
|
if [ -f src/_typed_dict_test_helper.py ]; then
|
||||||
exit 1
|
exit 1
|
||||||
@ -83,24 +72,20 @@ cp %{SOURCE1} src/
|
|||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
%if ! %{with test}
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with test}
|
|
||||||
%check
|
%check
|
||||||
%python_exec src/test_typing_extensions.py
|
pushd src
|
||||||
%endif
|
%python_exec -m unittest -v test_typing_extensions
|
||||||
|
popd
|
||||||
|
|
||||||
%if ! %{with test}
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CHANGELOG.md README.md
|
%doc CHANGELOG.md README.md
|
||||||
%{python_sitelib}/typing_extensions.py*
|
%{python_sitelib}/typing_extensions.py*
|
||||||
%pycache_only %{python_sitelib}/__pycache__/typing_extensions*
|
%pycache_only %{python_sitelib}/__pycache__/typing_extensions*
|
||||||
%{python_sitelib}/typing_extensions-%{version}*-info
|
%{python_sitelib}/typing_extensions-%{version}*-info
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user