]> git.pld-linux.org Git - packages/python-pyClamd.git/blob - python-pyClamd.spec
- drop python3-distribute deps
[packages/python-pyClamd.git] / python-pyClamd.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  pyClamd
8 Summary:        A python interface to Clamd (Clamav daemon)
9 # Name must match the python module/package name (as in 'import' statement)
10 Name:           python-%{module}
11 Version:        0.3.10
12 Release:        10
13 License:        - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
14 Group:          Libraries/Python
15 Source0:        https://pypi.python.org/packages/source/p/pyClamd/%{module}-%{version}.tar.gz
16 # Source0-md5:  370d7c12da34376eca730aea193a8712
17 URL:            http://xael.org/norman/python/pyclamd/
18 BuildRequires:  rpmbuild(macros) >= 1.710
19 %if %{with python2}
20 BuildRequires:  python-devel
21 BuildRequires:  python-distribute
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel
25 BuildRequires:  python3-modules
26 %endif
27 Requires:       python-modules
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 pyClamd is a python interface to Clamd (Clamav daemon). By using
33 pyClamd, you can add virus detection capabilities to your python
34 software in an efficient and easy way.
35
36 %package -n python3-%{module}
37 Summary:        -
38 Summary(pl.UTF-8):      -
39 Group:          Libraries/Python
40 Requires:       python3-modules
41
42 %description -n python3-%{module}
43 pyClamd is a python interface to Clamd (Clamav daemon). By using
44 pyClamd, you can add virus detection capabilities to your python
45 software in an efficient and easy way.
46
47 %prep
48 %setup -q -n %{module}-%{version}
49
50 sed -i -e 's#/etc/clamav/clamd.conf#/etc/clamd.conf#g' README.txt pyclamd/pyclamd.py
51
52 %build
53 %if %{with python2}
54 %py_build %{?with_tests:test}
55 %endif
56
57 %if %{with python3}
58 %py3_build %{?with_tests:test}
59 %endif
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63
64 %if %{with python2}
65 %py_install
66
67 %py_postclean
68 %endif
69
70 %if %{with python3}
71 %py3_install
72 %endif
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %if %{with python2}
78 %files
79 %defattr(644,root,root,755)
80 %doc README.txt
81 %dir %{py_sitescriptdir}/pyclamd
82 %{py_sitescriptdir}/pyclamd/*.py[co]
83 %if "%{py_ver}" > "2.4"
84 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
85 %endif
86 %endif
87
88 %if %{with python3}
89 %files -n python3-%{module}
90 %defattr(644,root,root,755)
91 %doc README.txt
92 %{py3_sitescriptdir}/pyclamd
93 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
94 %endif
This page took 0.050517 seconds and 3 git commands to generate.