]> git.pld-linux.org Git - packages/python-typing.git/blame - python-typing.spec
- release 2 (by relup.sh)
[packages/python-typing.git] / python-typing.spec
CommitLineData
7dc2f964 1#
781cfd24 2# Conditional build:
c088d166 3%bcond_with tests # unit tests (testing by python2 fails)
781cfd24 4%bcond_without python2 # CPython 2.x module
c088d166 5%bcond_with python3 # CPython 3.x module (for Python < 3.5)
781cfd24
AM
6
7%define module typing
8%define egg_name typing
9%define pypi_name typing
10Summary: Type Hints for Python
c088d166 11Summary(pl.UTF-8): Podpowiedzi typów dla Pythona
781cfd24 12Name: python-%{pypi_name}
30efb1ed 13Version: 3.7.4.1
ae01644e 14Release: 2
30efb1ed 15License: PSF v2
781cfd24 16Group: Libraries/Python
c088d166
JB
17#Source0Download: https://pypi.org/simple/typing/
18Source0: https://files.pythonhosted.org/packages/source/t/typing/%{pypi_name}-%{version}.tar.gz
30efb1ed 19# Source0-md5: 0a1ebd4af65b4769e33459004eb20345
c088d166 20URL: https://pypi.org/project/typing/
781cfd24
AM
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.714
23%if %{with python2}
c088d166 24BuildRequires: python-modules >= 1:2.7
781cfd24
AM
25BuildRequires: python-setuptools
26%endif
27%if %{with python3}
30efb1ed 28BuildRequires: python3-modules >= 1:3.4
c088d166 29BuildRequires: python3-modules < 1:3.5
781cfd24
AM
30BuildRequires: python3-setuptools
31%endif
c088d166 32Requires: python-modules >= 1:2.7
781cfd24
AM
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
781cfd24
AM
37Typing defines a standard notation for Python function and variable
38type annotations. The notation can be used for documenting code in a
39concise, standard format, and it has been designed to also be used by
40static and runtime type checkers, static analyzers, IDEs and other
41tools.
42
c088d166
JB
43%description -l pl.UTF-8
44Typing definiuje standardową notację opisów typów funkcji i zmiennych
45w Pythonie. Notacja może być używana do dokumentowania kodu w
46zwięzłym, standardowym formacie; została zaprojektowana także z myślą
47o używaniu przez narzędzia do statycznego i dynamicznego sprawdzania
48typów, analizatory statyczne, IDE i inne narzędzia.
49
50%package -n python3-%{pypi_name}
781cfd24 51Summary: Type Hints for Python
c088d166 52Summary(pl.UTF-8): Podpowiedzi typów dla Pythona
781cfd24 53Group: Libraries/Python
30efb1ed 54Requires: python3-modules >= 1:3.5
781cfd24 55
c088d166 56%description -n python3-%{pypi_name}
781cfd24
AM
57Typing defines a standard notation for Python function and variable
58type annotations. The notation can be used for documenting code in a
59concise, standard format, and it has been designed to also be used by
60static and runtime type checkers, static analyzers, IDEs and other
61tools.
62
c088d166
JB
63%description -n python3-%{pypi_name} -l pl.UTF-8
64Typing definiuje standardową notację opisów typów funkcji i zmiennych
65w Pythonie. Notacja może być używana do dokumentowania kodu w
66zwięzłym, standardowym formacie; została zaprojektowana także z myślą
67o używaniu przez narzędzia do statycznego i dynamicznego sprawdzania
68typów, analizatory statyczne, IDE i inne narzędzia.
69
781cfd24
AM
70%prep
71%setup -q -n %{pypi_name}-%{version}
72
73%build
74%if %{with python2}
c088d166
JB
75%py_build
76
77%if %{with tests}
78PYTHONPATH=$(pwd)/src \
79%{__python} -m unittest discover -s src
80%endif
781cfd24
AM
81%endif
82
83%if %{with python3}
c088d166
JB
84%py3_build
85
86%if %{with tests}
87PYTHONPATH=$(pwd)/src \
88%{__python3} -m unittest discover -s src
89%endif
781cfd24
AM
90%endif
91
92%install
93rm -rf $RPM_BUILD_ROOT
94
95%if %{with python2}
96%py_install
c088d166 97
781cfd24
AM
98%py_postclean
99%endif
100
101%if %{with python3}
102%py3_install
103%endif
104
105%clean
106rm -rf $RPM_BUILD_ROOT
107
108%if %{with python2}
109%files
110%defattr(644,root,root,755)
c088d166
JB
111%doc README.rst
112%{py_sitescriptdir}/%{module}.py[co]
781cfd24
AM
113%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
114%endif
115
116%if %{with python3}
c088d166 117%files -n python3-%{pypi_name}
781cfd24 118%defattr(644,root,root,755)
c088d166 119%doc README.rst
781cfd24 120%{py3_sitescriptdir}/%{module}.py
781cfd24 121%{py3_sitescriptdir}/__pycache__/%{module}.cpython*.pyc
c088d166 122%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
781cfd24 123%endif
This page took 0.084448 seconds and 4 git commands to generate.