%global pypi_name resumable-urlretrieve %global desc %{expand: \ Small library to fetch files over HTTP and resume their download.} Name: python-%{pypi_name} Version: 0.1.6 Release: 2%{?dist} Summary: Small library to fetch files over HTTP and resume their download License: MIT URL: https://github.com/berdario/resumable-urlretrieve Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %?python_enable_dependency_generator BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: python3dist(requests) BuildRequires: python3dist(setuptools) BuildRequires: python3dist(rangehttpserver) %description %{desc} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %{desc} %prep %autosetup -n %{pypi_name}-%{version} # Comment out to remove /usr/bin/env shebangs # Can use something similar to correct/remove /usr/bin/python shebangs also find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' %build %py3_build %install %py3_install %check PYTHONPATH=. pytest-3 %files -n python3-%{pypi_name} %doc README.md %{python3_sitelib}/resumable %{python3_sitelib}/resumable_urlretrieve-%{version}-py?.?.egg-info %changelog * Fri Jan 11 2019 Luis Bazan - 0.1.6-2 - Fix comment #1 in BZ 1665541 * Fri Jan 11 2019 Luis Bazan - 0.1.6-1 - Initial package.