3 %bcond_with tests # unit tests (testing by python2 fails)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_with python3 # CPython 3.x module (for Python < 3.5)
8 %define egg_name typing
9 %define pypi_name typing
10 Summary: Type Hints for Python
11 Summary(pl.UTF-8): Podpowiedzi typów dla Pythona
12 Name: python-%{pypi_name}
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/typing/
18 Source0: https://files.pythonhosted.org/packages/source/t/typing/%{pypi_name}-%{version}.tar.gz
19 # Source0-md5: 0a1ebd4af65b4769e33459004eb20345
20 URL: https://pypi.org/project/typing/
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.714
24 BuildRequires: python-modules >= 1:2.7
25 BuildRequires: python-setuptools
28 BuildRequires: python3-modules >= 1:3.4
29 BuildRequires: python3-modules < 1:3.5
30 BuildRequires: python3-setuptools
32 Requires: python-modules >= 1:2.7
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Typing defines a standard notation for Python function and variable
38 type annotations. The notation can be used for documenting code in a
39 concise, standard format, and it has been designed to also be used by
40 static and runtime type checkers, static analyzers, IDEs and other
43 %description -l pl.UTF-8
44 Typing definiuje standardową notację opisów typów funkcji i zmiennych
45 w Pythonie. Notacja może być używana do dokumentowania kodu w
46 zwięzłym, standardowym formacie; została zaprojektowana także z myślą
47 o używaniu przez narzędzia do statycznego i dynamicznego sprawdzania
48 typów, analizatory statyczne, IDE i inne narzędzia.
50 %package -n python3-%{pypi_name}
51 Summary: Type Hints for Python
52 Summary(pl.UTF-8): Podpowiedzi typów dla Pythona
53 Group: Libraries/Python
54 Requires: python3-modules >= 1:3.5
56 %description -n python3-%{pypi_name}
57 Typing defines a standard notation for Python function and variable
58 type annotations. The notation can be used for documenting code in a
59 concise, standard format, and it has been designed to also be used by
60 static and runtime type checkers, static analyzers, IDEs and other
63 %description -n python3-%{pypi_name} -l pl.UTF-8
64 Typing definiuje standardową notację opisów typów funkcji i zmiennych
65 w Pythonie. Notacja może być używana do dokumentowania kodu w
66 zwięzłym, standardowym formacie; została zaprojektowana także z myślą
67 o używaniu przez narzędzia do statycznego i dynamicznego sprawdzania
68 typów, analizatory statyczne, IDE i inne narzędzia.
71 %setup -q -n %{pypi_name}-%{version}
78 PYTHONPATH=$(pwd)/src \
79 %{__python} -m unittest discover -s src
87 PYTHONPATH=$(pwd)/src \
88 %{__python3} -m unittest discover -s src
93 rm -rf $RPM_BUILD_ROOT
106 rm -rf $RPM_BUILD_ROOT
110 %defattr(644,root,root,755)
112 %{py_sitescriptdir}/%{module}.py[co]
113 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
117 %files -n python3-%{pypi_name}
118 %defattr(644,root,root,755)
120 %{py3_sitescriptdir}/%{module}.py
121 %{py3_sitescriptdir}/__pycache__/%{module}.cpython*.pyc
122 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info