%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: 4%{?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 - 1.2.0-4 - Fix comment #15 in BZ 1665563. * Mon Jan 21 2019 Luis Bazan - 1.2.0-3 - Fix comment #6 in BZ 1665563. * Mon Jan 14 2019 Luis Bazan - 1.2.0-2 - Fix comment #1 in BZ 1665563. * Fri Jan 11 2019 Luis Bazan - 1.2.0-1 - Initial package.