Blob Blame History Raw
%define srcname yourls

Name:           python-%{srcname}
Version:        0.2.0
Release:        15%{?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 python2-%{srcname}
Summary:        Simple Python client for the YOURLS URL shortener

BuildRequires:  python2-devel
BuildRequires:  python2-pytest

%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
python-yourls is a simple python based API client for the YOURLS URL shortener

This is the Python 2 version of the module.

%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

%build
%py2_build
%py3_build

# Build the documentation
pushd doc
make html
# Remove sphinx leftovers
rm -rf _build/html/.{doctrees,buildinfo}
popd

%install
%py2_install
%py3_install

%check
%{__python2} setup.py test
%{__python3} setup.py test

%files -n python2-%{srcname}
%license LICENSE
%doc README doc/_build/html/
%{python2_sitelib}/*

%files -n python3-%{srcname}
%license LICENSE
%doc README doc/_build/html/
%{python3_sitelib}/*

%changelog
* 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