# Note: I am completely uninterested in Python 2 at this point. If you want
# this package to be built for Python 2 in addition to Python 3, I would be
# more than happy to give you this package.
%global modname RangeHTTPServer
%global srcname rangehttpserver
%global sum SimpleHTTPServer with support for Range requests
Name: python-%{srcname}
Summary: %{sum}
URL: https://pypi.python.org/pypi/%{srcname}
License: ASL 2.0
Version: 1.2.0
Release: 2%{?dist}
Source0: https://files.pythonhosted.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
%description
SimpleHTTPServer with support for Range requests.
%package -n python3-%{srcname}
Summary: %{sum}
BuildRequires: python3-devel
# For the unit tests
BuildRequires: python3-pytest
BuildRequires: python3-requests
Requires: python3-requests
%description -n python3-%{srcname}
%{description}
%prep
%setup -q -n %{srcname}-%{version}
%build
%py3_build
%install
%py3_install
%check
# Tests aren't included in the dist...
#py.test-3
%files -n python3-%{srcname}
# FIXME: Add the licence: https://github.com/danvk/RangeHTTPServer/pull/15
%{python3_sitelib}/%{modname}
%{python3_sitelib}/%{srcname}*.egg-info
%changelog
* Sat Oct 15 2016 Mathieu Bridon <bochecha@daitauha.fr> - 1.2.0-2
- Fix the licence tag.
- Add two comments as requested during the review.
* Sat Oct 15 2016 Mathieu Bridon <bochecha@daitauha.fr> - 1.2.0-1
- Initial package for Fedora.