3d9b0cf
%global pypi_name zeroconf
3d9b0cf
3d9b0cf
Name:           python-%{pypi_name}
9c6283f
Version:        0.18.0
b4ee06b
Release:        2%{?dist}
3d9b0cf
Summary:        Pure Python Multicast DNS Service Discovery Library
3d9b0cf
3d9b0cf
License:        LGPLv2
3d9b0cf
URL:            https://github.com/jstasiak/%{name}
3d9b0cf
Source0:        %{url}/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz
3d9b0cf
BuildArch:      noarch
3d9b0cf
51095a8
BuildRequires:  python2-devel
51095a8
BuildRequires:  python2-setuptools
51095a8
BuildRequires:  python2-pytest
9c6283f
BuildRequires:  python2-mock
51095a8
BuildRequires:  python-enum34
51095a8
BuildRequires:  python-netifaces
51095a8
BuildRequires:  python-six
51095a8
3d9b0cf
BuildRequires:  python3-devel
3d9b0cf
BuildRequires:  python3-setuptools
3d9b0cf
BuildRequires:  python3-pytest
9c6283f
BuildRequires:  python3-mock
3d9b0cf
BuildRequires:  python3-netifaces
3d9b0cf
BuildRequires:  python3-six
3d9b0cf
242a61f
# Integration tests work in mock but fail in Koji with PermissionError
242a61f
%bcond_with integration
242a61f
3d9b0cf
%description
3d9b0cf
A pure Python implementation of multicast DNS service discovery
3d9b0cf
supporting Bonjour/Avahi.
3d9b0cf
51095a8
%package -n     python2-%{pypi_name}
51095a8
Summary:        Pure Python 2 Multicast DNS Service Discovery Library
51095a8
%{?python_provide:%python_provide python2-%{pypi_name}}
51095a8
51095a8
Requires:       python-enum34
51095a8
Requires:       python-netifaces
51095a8
Requires:       python-six
51095a8
51095a8
%description -n python2-%{pypi_name}
51095a8
A pure Python 2 implementation of multicast DNS service discovery
51095a8
supporting Bonjour/Avahi.
51095a8
3d9b0cf
%package -n     python3-%{pypi_name}
51095a8
Summary:        Pure Python 3 Multicast DNS Service Discovery Library
3d9b0cf
%{?python_provide:%python_provide python3-%{pypi_name}}
3d9b0cf
3d9b0cf
Requires:       python3-netifaces
3d9b0cf
Requires:       python3-six
3d9b0cf
3d9b0cf
%description -n python3-%{pypi_name}
51095a8
A pure Python 3 implementation of multicast DNS service discovery
3d9b0cf
supporting Bonjour/Avahi.
3d9b0cf
3d9b0cf
%prep
3d9b0cf
%autosetup
3d9b0cf
# Remove bundled egg-info
3d9b0cf
rm -rf %{pypi_name}.egg-info
3d9b0cf
b4ee06b
# Remove enum-compat from install_requires
b4ee06b
# See https://bugzilla.redhat.com/show_bug.cgi?id=1432165
b4ee06b
sed -i '/enum-compat/d' setup.py
3d9b0cf
3d9b0cf
%build
51095a8
%py2_build
3d9b0cf
%py3_build
3d9b0cf
3d9b0cf
3d9b0cf
%install
51095a8
%py2_install
3d9b0cf
%py3_install
3d9b0cf
3d9b0cf
3d9b0cf
%check
51095a8
%{__python2} -m pytest \
51095a8
%if %{with integartion}
51095a8
51095a8
%else
51095a8
  -k "not integration"
51095a8
%endif
51095a8
242a61f
%{__python3} -m pytest \
242a61f
%if %{with integartion}
242a61f
242a61f
%else
242a61f
  -k "not integration"
242a61f
%endif
3d9b0cf
3d9b0cf
51095a8
%files -n python2-%{pypi_name}
51095a8
%license COPYING
51095a8
%doc README.rst
51095a8
%{python2_sitelib}/%{pypi_name}.py*
51095a8
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
51095a8
51095a8
3d9b0cf
%files -n python3-%{pypi_name}
3d9b0cf
%license COPYING
3d9b0cf
%doc README.rst
3d9b0cf
%{python3_sitelib}/__pycache__/*
3d9b0cf
%{python3_sitelib}/%{pypi_name}.py
3d9b0cf
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
3d9b0cf
3d9b0cf
3d9b0cf
%changelog
b4ee06b
* Tue Mar 14 2017 Miro Hrončok <mhroncok@redhat.com> - 0.18.0-2
b4ee06b
- Remove enum-compat from install_requires (#1432165)
b4ee06b
9c6283f
* Sat Feb 18 2017 Peter Robinson <pbrobinson@fedoraproject.org> 0.18.0-1
9c6283f
- Update to 0.18.0
9c6283f
f4db944
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.6-4
f4db944
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f4db944
767f48c
* Wed Dec 21 2016 Miro Hrončok <mhroncok@redhat.com> - 0.17.6-3
767f48c
- Rebuild for Python 3.6
767f48c
51095a8
* Wed Dec 21 2016 Miro Hrončok <mhroncok@redhat.com> - 0.17.6-2
51095a8
- Add Python 2 subpackage
51095a8
3d9b0cf
* Sun Dec 04 2016 Miro Hrončok <mhroncok@redhat.com> - 0.17.6-1
3d9b0cf
- Initial package