%define srcname yourls
Name: python-%{srcname}
Version: 0.2.0
Release: 20%{?dist}
Summary: Simple Python client for the YOURLS URL shortener
License: GPLv2+
URL: http://tflink.github.com/python-yourls/
Source0: https://github.com/downloads/tflink/python-yourls/%{name}-%{version}.tar.gz
BuildArch: noarch
# Required for building the documentation
BuildRequires: python3-sphinx
%description
python-yourls is a simple python based API client for the YOURLS URL shortener
%package -n python3-%{srcname}
Summary: Simple Python client for the YOURLS URL shortener
BuildRequires: python3-devel
BuildRequires: python3-pytest
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname}
python-yourls is a simple python based API client for the YOURLS URL shortener
This is the Python 3 version of the module.
%prep
%setup -q
# make the test run Python 3 pytest
sed -i "s/'py.test'/'py.test-3'/" setup.py
# the code base is python2 only
2to3 --write --nobackup .
%build
%py3_build
# Build the documentation
pushd doc
make SPHINXBUILD=sphinx-build-3 html
# Remove sphinx leftovers
rm -rf _build/html/.{doctrees,buildinfo}
popd
%install
%py3_install
%check
%{__python3} setup.py test
%files -n python3-%{srcname}
%license LICENSE
%doc README doc/_build/html/
%{python3_sitelib}/*
%changelog
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.0-20
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.0-19
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Oct 11 2018 Miro Hrončok <mhroncok@redhat.com> - 0.2.0-16
- Python2 binary package has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.2.0-14
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Nov 20 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.2.0-12
- Provide a Python 3 subpackage
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.2.0-11
- Python 2 binary package renamed to python2-yourls
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Nov 22 2011 Tim Flink <tflink@fedoraproject.org> - 0.2.0-1
- Updated to new version with better error handling
* Mon Nov 14 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.2-1
- Fixed bug where empty api urls were allowed
- Added ability to use 'title' when shortening a URL
* Tue Oct 11 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.1-3
- removed extra chars in spec file that were breaking build
* Tue Aug 30 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.1-2
- corrected license tag
* Tue Aug 23 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.1-1
- Initial package for 0.1.1