Files
python-parfive/python-parfive.spec
Steve Kowalik 5a35ef30a8 - Update to 2.0.2:
* Vendor parse_header out of the deprecated cgi module for Python 3.11
    compatibility
  * Fix a bug where an asyncio.CancelledError was not properly caught
  * The file_progress, notebook, use_aiofiles, and header keyword arguments
    to parfive.Downloader have been removed and moved into the
    parfive.SessionConfig object.
  * The timeouts keyword argument has been removed from the run_download()
    and download() methods and replaced by an option in SessionConfig.
  * Add a new SessionConfig object to allow advanced configuration of the
    Downloader
  * Improve the CLI with more options
  * Use tqdm's auto notebook detection
  * Fix issue with small files where the size of a chunk would round down to
    0 bytes
  * Remove the default download timeout of 5 minutes for a single file
  * Cast timeout environment variables to numbers
  * Add a Downloader.simple_download method to easily download a list of
    URLs to a single directory
  * Add support for optionally using aiofiles to write files to disk.
- Switch to pyproject macros.
- Stop using greedy globs in %files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parfive?expand=0&rev=9
2023-08-02 03:16:53 +00:00

89 lines
2.7 KiB
RPMSpec

#
# spec file for package python-parfive
#
# Copyright (c) 2023 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/
#
Name: python-parfive
Version: 2.0.2
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