]> git.pld-linux.org Git - packages/python-helper.git/blob - python-helper.spec
rebuild with tests and docs
[packages/python-helper.git] / python-helper.spec
1 #
2 # Conditional build:
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
6
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
9 Name:           python-helper
10 Version:        2.4.2
11 Release:        7
12 License:        BSD
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
18 %if %{with python2}
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
25 %endif
26 %if %{with tests}
27 BuildRequires:  python-mock
28 %if "%{py_ver}" < "2.7"
29 BuildRequires:  python-unittest2
30 %endif
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-PyYAML
35 BuildRequires:  python3-modules >= 1:3.2
36 BuildRequires:  python3-setuptools
37 %if %{with tests}
38 # TODO: switch to unittest.mock (when tests are included)
39 BuildRequires:  python3-mock
40 %endif
41 %endif
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  rpmbuild(macros) >= 1.714
44 Requires:       python-modules >= 1:2.6
45 BuildArch:      noarch
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Helper is a development library for quickly writing configurable
50 applications and daemons.
51
52 %description -l pl.UTF-8
53 Helper to biblioteka programistyczna do szybkiego pisania
54 konfigurowalnych aplikacji i demonów.
55
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
61
62 %description -n python3-helper
63 Helper is a development library for quickly writing configurable
64 applications and daemons.
65
66 %description -n python3-helper -l pl.UTF-8
67 Helper to biblioteka programistyczna do szybkiego pisania
68 konfigurowalnych aplikacji i demonów.
69
70 %prep
71 %setup -q -n helper-%{version}
72
73 %build
74 %if %{with python2}
75 %py_build %{?with_tests:test}
76 %endif
77
78 %if %{with python3}
79 %py3_build %{?with_tests:test}
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %py_install
87
88 %py_postclean
89 %endif
90
91 %if %{with python3}
92 %py3_install
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 README.rst
102 %{py_sitescriptdir}/helper
103 %{py_sitescriptdir}/helper-%{version}-py*.egg-info
104 %endif
105
106 %if %{with python3}
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
112 %endif
This page took 0.10083 seconds and 3 git commands to generate.