3a3185f
%global pretty_name RangeHTTPServer
3a3185f
%global pypi_name rangehttpserver
3a3185f
3a3185f
%global desc %{expand: \
3a3185f
SimpleHTTPServer with support for Range requests.}
3a3185f
3a3185f
Name:           python-%{pypi_name}
3a3185f
Version:        1.2.0
86a7ad4
Release:        15%{?dist}
3a3185f
Summary:        SimpleHTTPServer with support for Range requests
3a3185f
3a3185f
License:        ASL 2.0
3a3185f
URL:            https://github.com/danvk/RangeHTTPServer
3a3185f
Source0:        %{url}/archive/%{version}/%{pretty_name}-%{version}.tar.gz
3a3185f
BuildArch:      noarch
3a3185f
 
3a3185f
BuildRequires: python3-devel
3a3185f
BuildRequires: python3dist(pytest)
3a3185f
BuildRequires: python3dist(requests)
3a3185f
BuildRequires: python3dist(setuptools)
3a3185f
BuildRequires: python3dist(nose)
f94905f
f94905f
%description
3a3185f
%{desc}
f94905f
3a3185f
%package -n python3-%{pypi_name}
3a3185f
Summary: %{summary}
3a3185f
%{?python_provide:%python_provide python3-%{pypi_name}}
3a3185f
 
3a3185f
Requires: python3dist(requests)
3a3185f
%description -n python3-%{pypi_name}
3a3185f
%{desc}
f94905f
3a3185f
%prep
3a3185f
%autosetup -n %{pretty_name}-%{version}
3a3185f
rm -rf %{pretty_name}.egg-info
f94905f
3a3185f
find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} ';'
f94905f
3a3185f
# the server_test removed because need network
3a3185f
# Upstream Issue
3a3185f
# https://github.com/danvk/RangeHTTPServer/issues/21
3a3185f
rm -rf tests/server_test.py
f94905f
3a3185f
chmod 0644 RangeHTTPServer/__init__.py RangeHTTPServer/__main__.py
f94905f
f94905f
%build
f94905f
%py3_build
f94905f
f94905f
%install
f94905f
%py3_install
f94905f
f94905f
%check
3a3185f
PYTHONPATH=. pytest-3
f94905f
3a3185f
%files -n python3-%{pypi_name}
3a3185f
%license LICENSE
3a3185f
%doc README
3a3185f
%{python3_sitelib}/%{pretty_name}
fea925b
%{python3_sitelib}/rangehttpserver-%{version}-py%{python3_version}.egg-info
f94905f
f94905f
%changelog
86a7ad4
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-15
86a7ad4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
86a7ad4
afd2cef
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-14
afd2cef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
afd2cef
7f7cd20
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.2.0-13
7f7cd20
- Rebuilt for Python 3.10
7f7cd20
1a45ba7
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-12
1a45ba7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
1a45ba7
3df47c5
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-11
3df47c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3df47c5
b6320c0
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-10
b6320c0
- Rebuilt for Python 3.9
b6320c0
f60f5a4
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-9
f60f5a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f60f5a4
3b8f43a
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-8
3b8f43a
- Rebuilt for Python 3.8.0rc1 (#1748018)
3b8f43a
d67d610
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-7
d67d610
- Rebuilt for Python 3.8
d67d610
cc27ab0
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-6
cc27ab0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
cc27ab0
3a3185f
* Fri Feb 15 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.2.0-5
3a3185f
- Fix comment #15 in BZ 1665563.
f94905f
3a3185f
* Mon Jan 21 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.2.0-4
3a3185f
- Fix comment #6 in BZ 1665563.
f94905f
3a3185f
* Mon Jan 14 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.2.0-3
3a3185f
- Fix comment #1 in BZ 1665563.
f94905f
3a3185f
* Fri Jan 11 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.2.0-2
3a3185f
- Initial package.
f94905f
f94905f
* Sat Oct 15 2016 Mathieu Bridon <bochecha@daitauha.fr> - 1.2.0-1
f94905f
- Initial package for Fedora.