forked from pool/python-parfive
- Update to 2.2.0 * Python 3.9 support has been dropped and 3.13 is now tested. * Checksums can now be verified when deciding to overwrite a file and when downloads are completed based on user or server provided checksums. (This is opt-in for now) * Add checksums support @Cadair (#165) * The first request to download a file will now attempt to use the HEAD method to read the checksum and content-disposition headers. If the HEAD request returns any status code other than 200 the old GET behaviour will be tried - Fix a 302 issue @Cadair (#170), Add a test for the head or get helper @Cadair (#169), Use a HEAD for the first request @Cadair (#168) * The URL associated with every downloaded file is now propagated through to the Results object * Add urls to results @samaloney (#146) * Fix a bug where result urls were not updated in retry @samaloney (#153) * Fix codecov @Cadair (#167) * Add type hints to _get_http @Cadair (#164) * Migrate away from setup.cfg and use more ruff @Cadair (#162) * Drop Python 3.9 as it's EOL and fix tests @Cadair (#161) - Use Python 3.11 on SLE-15 by default OBS-URL: https://build.opensuse.org/request/show/1277541 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parfive?expand=0&rev=13
90 lines
2.8 KiB
RPMSpec
90 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package python-parfive
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-parfive
|
|
Version: 2.2.0
|
|
Release: 0
|
|
Summary: A HTTP and FTP parallel file downloader
|
|
License: MIT
|
|
URL: https://parfive.readthedocs.io/
|
|
Source: https://files.pythonhosted.org/packages/source/p/parfive/parfive-%{version}.tar.gz
|
|
BuildRequires: %{python_module base >= 3.7}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools_scm}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module aioftp >= 0.17.1}
|
|
BuildRequires: %{python_module aiofiles}
|
|
BuildRequires: %{python_module aiohttp}
|
|
BuildRequires: %{python_module pytest-asyncio}
|
|
BuildRequires: %{python_module pytest-cov}
|
|
BuildRequires: %{python_module pytest-localserver}
|
|
BuildRequires: %{python_module pytest-socket}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module tqdm >= 4.27.0}
|
|
# /SECTION
|
|
Requires: python-aiohttp
|
|
Requires: python-tqdm
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
Recommends: python-aiofiles
|
|
Recommends: python-aioftp
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
%description
|
|
Parfive is a library for downloading files, its objective is to
|
|
provide an API for queuing files for download and then providing
|
|
feedback to the user about the downloads in progress. It also
|
|
provides an interface for inspecting any failed downloads.
|
|
|
|
%prep
|
|
%autosetup -p1 -n parfive-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%python_clone -a %{buildroot}%{_bindir}/parfive
|
|
|
|
%check
|
|
# Disable tests that require a network connection
|
|
%pytest -k 'not test_ftp and not test_ftp_http'
|
|
|
|
%post
|
|
%python_install_alternative parfive
|
|
|
|
%postun
|
|
%python_uninstall_alternative parfive
|
|
|
|
%files %{python_files}
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%{python_sitelib}/parfive
|
|
%{python_sitelib}/parfive-%{version}.dist-info
|
|
%python_alternative %{_bindir}/parfive
|
|
|
|
%changelog
|