9aa183f
%define srcname yourls
5e84073
9aa183f
Name:           python-%{srcname}
07ce76c
Version:        0.2.0
9aa183f
Release:        12%{?dist}
5e84073
Summary:        Simple Python client for the YOURLS URL shortener
5e84073
5e84073
License:        GPLv2+
5e84073
URL:            http://tflink.github.com/python-yourls/
5e84073
Source0:        https://github.com/downloads/tflink/python-yourls/%{name}-%{version}.tar.gz
5e84073
5e84073
BuildArch:      noarch
5e84073
9aa183f
# Required for building the documentation
9aa183f
BuildRequires:  python3-sphinx
5e84073
9aa183f
%description
9aa183f
python-yourls is a simple python based API client for the YOURLS URL shortener
b89058e
9aa183f
%package -n python2-%{srcname}
9aa183f
Summary:        Simple Python client for the YOURLS URL shortener
9aa183f
9aa183f
BuildRequires:  python2-devel
9aa183f
BuildRequires:  python2-pytest
9aa183f
9aa183f
%{?python_provide:%python_provide python2-%{srcname}}
9aa183f
9aa183f
%description -n python2-%{srcname}
9aa183f
python-yourls is a simple python based API client for the YOURLS URL shortener
9aa183f
9aa183f
This is the Python 2 version of the module.
9aa183f
9aa183f
%package -n python3-%{srcname}
9aa183f
Summary:        Simple Python client for the YOURLS URL shortener
b89058e
9aa183f
BuildRequires:  python3-devel
9aa183f
BuildRequires:  python3-pytest
9aa183f
9aa183f
%{?python_provide:%python_provide python3-%{srcname}}
9aa183f
9aa183f
%description -n python3-%{srcname}
9aa183f
python-yourls is a simple python based API client for the YOURLS URL shortener
9aa183f
9aa183f
This is the Python 3 version of the module.
b89058e
5e84073
%prep
5e84073
%setup -q
5e84073
5e84073
%build
9aa183f
%py2_build
9aa183f
%py3_build
5e84073
9aa183f
# Build the documentation
9aa183f
pushd doc
9aa183f
make html
9aa183f
# Remove sphinx leftovers
9aa183f
rm -rf _build/html/.{doctrees,buildinfo}
9aa183f
popd
5e84073
5e84073
%install
9aa183f
%py2_install
9aa183f
%py3_install
5e84073
9aa183f
%check
9aa183f
%{__python2} setup.py test
9aa183f
%{__python3} setup.py test
5e84073
9aa183f
%files -n python2-%{srcname}
9aa183f
%license LICENSE
9aa183f
%doc README doc/_build/html/
9aa183f
%{python2_sitelib}/*
5e84073
9aa183f
%files -n python3-%{srcname}
9aa183f
%license LICENSE
9aa183f
%doc README doc/_build/html/
9aa183f
%{python3_sitelib}/*
5e84073
5e84073
%changelog
9aa183f
* Mon Nov 20 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.2.0-12
9aa183f
- Provide a Python 3 subpackage
9aa183f
b89058e
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.2.0-11
b89058e
- Python 2 binary package renamed to python2-yourls
b89058e
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
b89058e
c6c2311
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-10
c6c2311
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c6c2311
7538388
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-9
7538388
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7538388
d7c3fc8
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-8
d7c3fc8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d7c3fc8
eab7cc1
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-7
eab7cc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
eab7cc1
626c0a8
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-6
626c0a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
626c0a8
73368d4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-5
73368d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
73368d4
bfc0af7
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
bfc0af7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bfc0af7
a0231e3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-3
a0231e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a0231e3
18b41d4
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
18b41d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
18b41d4
07ce76c
* Tue Nov 22 2011 Tim Flink <tflink@fedoraproject.org> - 0.2.0-1
07ce76c
- Updated to new version with better error handling
07ce76c
b0ab890
* Mon Nov 14 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.2-1
b0ab890
- Fixed bug where empty api urls were allowed
b0ab890
- Added ability to use 'title' when shortening a URL
b0ab890
6cb9f70
* Tue Oct 11 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.1-3
6cb9f70
- removed extra chars in spec file that were breaking build
6cb9f70
5e84073
* Tue Aug 30 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.1-2
5e84073
- corrected license tag
5e84073
5e84073
* Tue Aug 23 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.1-1
5e84073
- Initial package for 0.1.1