61c9020
%if 0%{?fedora}
e00d55a
%global with_python3 1
61c9020
%endif
61c9020
61c9020
%global eggname pyLibravatar
61c9020
%global modname libravatar
61c9020
61c9020
Name:               python-pylibravatar
e00d55a
Version:            1.6
b77f0ce
Release:            8%{?dist}
61c9020
Summary:            Python module for Libravatar
61c9020
61c9020
Group:              Development/Libraries
61c9020
# The full text of the license isn't shipped
61c9020
# https://bugs.launchpad.net/pylibravatar/+bug/1173603
61c9020
License:            MIT
61c9020
URL:                http://pypi.python.org/pypi/pyLibravatar
61c9020
Source0:            http://pypi.python.org/packages/source/p/%{eggname}/%{eggname}-%{version}.tar.gz
1f25479
# https://code.launchpad.net/~ralph-bean/pylibravatar/tcp-dns/+merge/263157
1f25479
Patch0:             python-pylibravatar-dns-srv-tcp.patch
61c9020
61c9020
BuildArch:          noarch
61c9020
61c9020
61c9020
BuildRequires:      python2-devel
61c9020
BuildRequires:      python-pydns
61c9020
61c9020
%if 0%{?with_python3}
61c9020
BuildRequires:      python3-devel
e00d55a
BuildRequires:      python3-py3dns
61c9020
%endif
61c9020
61c9020
Requires:           python-pydns
61c9020
61c9020
%description
61c9020
PyLibravatar is an easy way to make use of the federated Libravatar
61c9020
avatar hosting service from within your Python applications.
61c9020
61c9020
%if 0%{?with_python3}
61c9020
%package -n python3-pylibravatar
61c9020
Summary:            Python module for Libravatar
61c9020
Group:              Development/Libraries
61c9020
e00d55a
Requires:           python3-py3dns
61c9020
61c9020
%description -n python3-pylibravatar
61c9020
PyLibravatar is an easy way to make use of the federated Libravatar
61c9020
avatar hosting service from within your Python applications.
61c9020
%endif
61c9020
61c9020
%prep
61c9020
%setup -q -n %{eggname}-%{version}
61c9020
1f25479
%patch0
1f25479
61c9020
# Correct wrong-file-end-of-line-encoding rpmlint issue
61c9020
sed -i 's/\r//' README.txt
61c9020
sed -i 's/\r//' Changelog.txt
61c9020
61c9020
# Remove bundled egg-info in case it exists
61c9020
rm -rf %{eggname}.egg-info
61c9020
%if 0%{?with_python3}
61c9020
rm -rf %{py3dir}
61c9020
cp -a . %{py3dir}
61c9020
%endif
61c9020
61c9020
%build
61c9020
%{__python} setup.py build
61c9020
%if 0%{?with_python3}
61c9020
pushd %{py3dir}
61c9020
%{__python3} setup.py build
61c9020
popd
61c9020
%endif
61c9020
61c9020
%install
61c9020
%if 0%{?with_python3}
61c9020
pushd %{py3dir}
61c9020
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
61c9020
popd
61c9020
%endif
61c9020
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
61c9020
61c9020
%files
61c9020
# Upstream doesn't ship the license full text
61c9020
# https://bugs.launchpad.net/pylibravatar/+bug/1173603
61c9020
%doc README.txt Changelog.txt
61c9020
%{python_sitelib}/%{modname}.py*
61c9020
%{python_sitelib}/%{eggname}-%{version}*
61c9020
61c9020
%if 0%{?with_python3}
61c9020
%files -n python3-pylibravatar
61c9020
# Upstream doesn't ship the license full text
61c9020
# https://bugs.launchpad.net/pylibravatar/+bug/1173603
bcbd71e
%doc README.txt Changelog.txt
61c9020
%{python3_sitelib}/%{modname}.py
61c9020
%{python3_sitelib}/__pycache__/*%{modname}*
61c9020
%{python3_sitelib}/%{eggname}-%{version}-*
61c9020
%endif
61c9020
61c9020
%changelog
b77f0ce
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-8
b77f0ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b77f0ce
fcc3a7b
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-7
fcc3a7b
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
fcc3a7b
1f25479
* Fri Jun 26 2015 Ralph Bean <rbean@redhat.com> - 1.6-6
1f25479
- Apply patch to use tcp for dns srv queries.
1f25479
fccc2a0
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-5
fccc2a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
fccc2a0
4ac338b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
4ac338b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4ac338b
15ae257
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.6-3
15ae257
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
15ae257
bcbd71e
* Tue Sep 24 2013 Ralph Bean <rbean@redhat.com> - 1.6-2
bcbd71e
- Fix file ownership in python3 subpackage.
bcbd71e
e00d55a
* Tue Sep 24 2013 Ralph Bean <rbean@redhat.com> - 1.6-1
e00d55a
- Latest upstream with python3 support.
e00d55a
- Enable the python3 subpackage.
e00d55a
4c57205
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-3
4c57205
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4c57205
61c9020
* Mon Jul 01 2013 Ralph Bean <rbean@redhat.com> - 1.5-2
61c9020
- Correct wrong-file-end-of-line-encoding rpmlint issue.
61c9020
61c9020
* Sat Apr 27 2013 Ralph Bean <rbean@redhat.com> - 1.5-1
61c9020
- Initial packaging for Fedora.
61c9020
- There is no test suite at this point.
61c9020
- Upstream doesn't seem to ship the license full text at this point.