3 %bcond_with tests # tests (actually no tests included)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Development library for quickly writing configurable applications and daemons
8 Summary(pl.UTF-8): Biblioteka programistyczna do szybkiego pisania konfigurowalnych aplikacji i demonów
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/helper/
15 Source0: https://files.pythonhosted.org/packages/source/h/helper/helper-%{version}.tar.gz
16 # Source0-md5: b5646fd7a2e6a73b08d221e9d9e654e4
17 URL: https://github.com/gmr/helper
19 BuildRequires: python-PyYAML
20 BuildRequires: python-modules >= 1:2.6
21 BuildRequires: python-setuptools
22 %if "%{py_ver}" < "2.7"
23 BuildRequires: python-argparse
24 BuildRequires: python-logutils
27 BuildRequires: python-mock
28 %if "%{py_ver}" < "2.7"
29 BuildRequires: python-unittest2
34 BuildRequires: python3-PyYAML
35 BuildRequires: python3-modules >= 1:3.2
36 BuildRequires: python3-setuptools
38 # TODO: switch to unittest.mock (when tests are included)
39 BuildRequires: python3-mock
42 BuildRequires: rpm-pythonprov
43 BuildRequires: rpmbuild(macros) >= 1.714
44 Requires: python-modules >= 1:2.6
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Helper is a development library for quickly writing configurable
50 applications and daemons.
52 %description -l pl.UTF-8
53 Helper to biblioteka programistyczna do szybkiego pisania
54 konfigurowalnych aplikacji i demonów.
56 %package -n python3-helper
57 Summary: Development library for quickly writing configurable applications and daemons
58 Summary(pl.UTF-8): Biblioteka programistyczna do szybkiego pisania konfigurowalnych aplikacji i demonów
59 Group: Libraries/Python
60 Requires: python3-modules >= 1:3.2
62 %description -n python3-helper
63 Helper is a development library for quickly writing configurable
64 applications and daemons.
66 %description -n python3-helper -l pl.UTF-8
67 Helper to biblioteka programistyczna do szybkiego pisania
68 konfigurowalnych aplikacji i demonów.
71 %setup -q -n helper-%{version}
75 %py_build %{?with_tests:test}
79 %py3_build %{?with_tests:test}
83 rm -rf $RPM_BUILD_ROOT
96 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc LICENSE README.rst
102 %{py_sitescriptdir}/helper
103 %{py_sitescriptdir}/helper-%{version}-py*.egg-info
107 %files -n python3-helper
108 %defattr(644,root,root,755)
109 %doc LICENSE README.rst
110 %{py3_sitescriptdir}/helper
111 %{py3_sitescriptdir}/helper-%{version}-py*.egg-info