Blob Blame History Raw
%global pretty_name RangeHTTPServer
%global pypi_name rangehttpserver

%global desc %{expand: \
SimpleHTTPServer with support for Range requests.}

Name:           python-%{pypi_name}
Version:        1.2.0
Release:        9%{?dist}
Summary:        SimpleHTTPServer with support for Range requests

License:        ASL 2.0
URL:            https://github.com/danvk/RangeHTTPServer
Source0:        %{url}/archive/%{version}/%{pretty_name}-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires: python3-devel
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(requests)
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(nose)

%description
%{desc}

%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
 
Requires: python3dist(requests)
%description -n python3-%{pypi_name}
%{desc}

%prep
%autosetup -n %{pretty_name}-%{version}
rm -rf %{pretty_name}.egg-info

find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} ';'

# the server_test removed because need network
# Upstream Issue
# https://github.com/danvk/RangeHTTPServer/issues/21
rm -rf tests/server_test.py

chmod 0644 RangeHTTPServer/__init__.py RangeHTTPServer/__main__.py

%build
%py3_build

%install
%py3_install

%check
PYTHONPATH=. pytest-3

%files -n python3-%{pypi_name}
%license LICENSE
%doc README
%{python3_sitelib}/%{pretty_name}
%{python3_sitelib}/rangehttpserver-%{version}-py?.?.egg-info

%changelog
* Fri Feb 15 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.2.0-9
- Fix comment #15 in BZ 1665563.

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-7
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-3
- Rebuild for Python 3.6

* 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.