%global pypi_name typing %global _description\ This is a backport of the standard library typing module to Python versions \ older than 3.5. \ Typing defines a standard notation for Python function and variable \ type annotations. The notation can be used for documenting code in a concise, \ standard format, and it has been designed to also be used by static and runtime \ type checkers, static analyzers, IDEs and other tools. %if 0%{?fedora} > 31 %global with_python2 0 %else %global with_python2 1 %endif Name: python-%{pypi_name} Version: 3.7.4.1 Release: 1%{?dist} Summary: Type Hints for Python License: PSF URL: https://docs.python.org/3/library/typing.html Source0: https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %if 0%{?with_python2} BuildRequires: python2-devel BuildRequires: python2-setuptools %endif BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %if 0%{?with_python3_other} BuildRequires: python%{python3_other_pkgversion}-devel BuildRequires: python%{python3_other_pkgversion}-setuptools %endif %description %_description %if 0%{?with_python2} %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} %_description %endif %package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} %description -n python%{python3_pkgversion}-%{pypi_name} %_description %if 0%{?with_python3_other} %package -n python%{python3_other_pkgversion}-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} %description -n python%{python3_other_pkgversion}-%{pypi_name} %_description %endif %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %if 0%{?with_python2} %py2_build %endif %py3_build %if 0%{?with_python3_other} %py3_other_build %endif %install # Must do the default python version install last because # the scripts in /usr/bin are overwritten with every setup.py install. %if 0%{?with_python2} %py2_install %endif %if 0%{?with_python3_other} %py3_other_install %endif %py3_install %check %if 0%{?with_python2} %{__python2} setup.py test %endif %{__python3} setup.py test %if 0%{?with_python3_other} %{__python3_other} setup.py test %endif %if 0%{?with_python2} %files -n python2-%{pypi_name} %license LICENSE %doc README.rst %{python2_sitelib}/%{pypi_name}.py* %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %files -n python%{python3_pkgversion}-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %if 0%{?with_python3_other} %files -n python%{python3_other_pkgversion}-%{pypi_name} %license LICENSE %doc README.rst %{python3_other_sitelib}/__pycache__/* %{python3_other_sitelib}/%{pypi_name}.py %{python3_other_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %changelog * Mon Oct 07 2019 Aurelien Bompard - 3.7.4.1-1 - Initial package.