]> git.pld-linux.org Git - packages/python3-zeroconf.git/blob - python-zeroconf.spec
- updated to 0.19.1, pl, cleanup
[packages/python3-zeroconf.git] / python-zeroconf.spec
1 #
2 # Conditional build:
3 %bcond_with     integration     # Integration tests work in mock but fail in Koji with PermissionError
4 %bcond_with     tests           # unit tests
5 %bcond_without  python2         # CPython 2.x module
6 %bcond_without  python3         # CPython 3.x module
7
8 %define module  zeroconf
9 Summary:        Pure Python Multicast DNS Service Discovery Library
10 Summary(pl.UTF-8):      Czysto pythonowa biblioteka Multicast DNS Service Discovery
11 Name:           python-%{module}
12 # keep 0.19.x here for python2 support
13 Version:        0.19.1
14 Release:        1
15 License:        LGPL v2
16 Group:          Libraries/Python
17 #Source0Download: https://github.com/jstasiak/python-zeroconf/releases
18 Source0:        https://github.com/jstasiak/python-zeroconf/archive/%{version}/%{module}-%{version}.tar.gz
19 # Source0-md5:  bda83913df1669610ba3c09f8133614e
20 Patch0:         %{name}-mock.patch
21 URL:            https://github.com/jstasiak/python-zeroconf
22 %if %{with python2}
23 BuildRequires:  python-devel >= 1:2.6
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-enum34
27 BuildRequires:  python-mock
28 BuildRequires:  python-netifaces >= 0.10.6
29 BuildRequires:  python-pytest
30 BuildRequires:  python-six
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-devel >= 1:3.4
35 BuildRequires:  python3-setuptools
36 %if %{with tests}
37 BuildRequires:  python3-netifaces >= 0.10.6
38 BuildRequires:  python3-pytest
39 BuildRequires:  python3-six
40 %endif
41 %endif
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  rpmbuild(macros) >= 1.714
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 A pure Python implementation of multicast DNS service discovery
49 supporting Bonjour/Avahi.
50
51 %description -l pl.UTF-8
52 Czysto pythonowa implementacja wykrywania usług multicastowych DNS
53 przy użyciu Bonjour/Avahi.
54
55 %package -n python3-%{module}
56 Summary:        Pure Python Multicast DNS Service Discovery Library
57 Summary(pl.UTF-8):      Czysto pythonowa biblioteka Multicast DNS Service Discovery
58 Group:          Libraries/Python
59
60 %description -n python3-%{module}
61 A pure Python implementation of multicast DNS service discovery
62 supporting Bonjour/Avahi.
63
64 %description -n python3-%{module} -l pl.UTF-8
65 Czysto pythonowa implementacja wykrywania usług multicastowych DNS
66 przy użyciu Bonjour/Avahi.
67
68 %prep
69 %setup -q
70 %patch0 -p1
71
72 # Remove enum-compat from install_requires
73 # See https://bugzilla.redhat.com/show_bug.cgi?id=1432165
74 sed -i '/enum-compat/d' setup.py
75
76 %build
77 %if %{with python2}
78 %py_build
79
80 %if %{with tests}
81 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
82 %{__python} -m pytest \
83         %{!?with_integration:-k "not integration"}
84 %endif
85 %endif
86
87 %if %{with python3}
88 %py3_build
89
90 %if %{with tests}
91 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
92 %{__python3} -m pytest \
93         %{!?with_integration:-k "not integration"}
94 %endif
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %py_install
102
103 %py_postclean
104 %endif
105
106 %if %{with python3}
107 %py3_install
108 %endif
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %files
115 %defattr(644,root,root,755)
116 %doc README.rst
117 %{py_sitescriptdir}/zeroconf.py[co]
118 %{py_sitescriptdir}/zeroconf-%{version}-py*.egg-info
119 %endif
120
121 %if %{with python3}
122 %files -n python3-%{module}
123 %defattr(644,root,root,755)
124 %doc README.rst
125 %{py3_sitescriptdir}/__pycache__/zeroconf.cpython-*.py[co]
126 %{py3_sitescriptdir}/zeroconf.py
127 %{py3_sitescriptdir}/zeroconf-%{version}-py*.egg-info
128 %endif
This page took 0.076896 seconds and 3 git commands to generate.