]> git.pld-linux.org Git - packages/python-typing.git/blob - python-typing.spec
- release 2 (by relup.sh)
[packages/python-typing.git] / python-typing.spec
1 #
2 # Conditional build:
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)
6
7 %define         module          typing
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}
13 Version:        3.7.4.1
14 Release:        2
15 License:        PSF v2
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
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.4
29 BuildRequires:  python3-modules < 1:3.5
30 BuildRequires:  python3-setuptools
31 %endif
32 Requires:       python-modules >= 1:2.7
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
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
41 tools.
42
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.
49
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
55
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
61 tools.
62
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.
69
70 %prep
71 %setup -q -n %{pypi_name}-%{version}
72
73 %build
74 %if %{with python2}
75 %py_build
76
77 %if %{with tests}
78 PYTHONPATH=$(pwd)/src \
79 %{__python} -m unittest discover -s src
80 %endif
81 %endif
82
83 %if %{with python3}
84 %py3_build
85
86 %if %{with tests}
87 PYTHONPATH=$(pwd)/src \
88 %{__python3} -m unittest discover -s src
89 %endif
90 %endif
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with python2}
96 %py_install
97
98 %py_postclean
99 %endif
100
101 %if %{with python3}
102 %py3_install
103 %endif
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %if %{with python2}
109 %files
110 %defattr(644,root,root,755)
111 %doc README.rst
112 %{py_sitescriptdir}/%{module}.py[co]
113 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
114 %endif
115
116 %if %{with python3}
117 %files -n python3-%{pypi_name}
118 %defattr(644,root,root,755)
119 %doc README.rst
120 %{py3_sitescriptdir}/%{module}.py
121 %{py3_sitescriptdir}/__pycache__/%{module}.cpython*.pyc
122 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
123 %endif
This page took 0.060171 seconds and 3 git commands to generate.