]> git.pld-linux.org Git - packages/python3-toolz.git/blob - python-toolz.spec
- new
[packages/python3-toolz.git] / python-toolz.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        List processing tools and functional utilities
8 Summary(pl.UTF-8):      Narzędzia do przetwarzania list oraz funkcyjne
9 Name:           python-toolz
10 # keep 0.10.x here for python2 support
11 Version:        0.10.0
12 Release:        1
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/toolz/
16 Source0:        https://files.pythonhosted.org/packages/source/t/toolz/toolz-%{version}.tar.gz
17 # Source0-md5:  3cb4317dbaff18b5a9201b69e57692a6
18 URL:            https://pypi.org/project/toolz/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-pytest
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.4
28 BuildRequires:  python3-setuptools
29 %if %{with tests}
30 BuildRequires:  python3-pytest
31 %endif
32 %endif
33 BuildRequires:  rpm-pythonprov
34 BuildRequires:  rpmbuild(macros) >= 1.714
35 Requires:       python-modules >= 1:2.7
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 A set of utility functions for iterators, functions, and dictionaries.
41
42 %description -l pl.UTF-8
43 Zbiór funkcji narzędziowych do iteratorów, funkcji i słowników.
44
45 %package -n python3-toolz
46 Summary:        List processing tools and functional utilities
47 Summary(pl.UTF-8):      Narzędzia do przetwarzania list oraz funkcyjne
48 Group:          Libraries/Python
49 Requires:       python3-modules >= 1:3.4
50
51 %description -n python3-toolz
52 A set of utility functions for iterators, functions, and dictionaries.
53
54 %description -n python3-toolz -l pl.UTF-8
55 Zbiór funkcji narzędziowych do iteratorów, funkcji i słowników.
56
57 %prep
58 %setup -q -n toolz-%{version}
59
60 %build
61 %if %{with python2}
62 %py_build
63
64 %if %{with tests}
65 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
66 %{__python} -m pytest toolz/tests
67 %endif
68 %endif
69
70 %if %{with python3}
71 %py3_build
72
73 %if %{with tests}
74 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
75 %{__python3} -m pytest toolz/tests
76 %endif
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81
82 %if %{with python2}
83 %py_install
84
85 %py_postclean
86 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/toolz/tests
87 %endif
88
89 %if %{with python3}
90 %py3_install
91
92 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/toolz/tests
93 %endif
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %files
100 %defattr(644,root,root,755)
101 %doc LICENSE.txt README.rst
102 %{py_sitescriptdir}/tlz
103 %{py_sitescriptdir}/toolz
104 %{py_sitescriptdir}/toolz-%{version}-py*.egg-info
105 %endif
106
107 %if %{with python3}
108 %files -n python3-toolz
109 %defattr(644,root,root,755)
110 %doc LICENSE.txt README.rst
111 %{py3_sitescriptdir}/tlz
112 %{py3_sitescriptdir}/toolz
113 %{py3_sitescriptdir}/toolz-%{version}-py*.egg-info
114 %endif
This page took 0.101929 seconds and 3 git commands to generate.