gnu: Add parfive.

* gnu/packages/python-web.scm (parfive): Newv variable.

Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
Sharlatan Hellseher 2022-10-14 21:45:52 +01:00 committed by Christopher Baines
parent c697ff9641
commit 472917ea6c
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -984,6 +984,48 @@ (define-public httpie
(properties `((lint-hidden-cve . ("CVE-2019-10751"))))
(license license:bsd-3)))
(define-public parfive
(package
(name "parfive")
(version "2.0.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "parfive" version))
(sha256
(base32
"19dcbb6g56l5s3ih0bhs3p4acgc0gf4zdzpj4w87m69li2nhmgpx"))))
(build-system python-build-system)
(arguments
(list #:phases #~(modify-phases %standard-phases
(add-before 'check 'disable-test-requiring-network
(lambda _
(substitute* "parfive/tests/test_downloader.py"
(("def test_ftp")
"def __off_test_ftp"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "python" "-m" "pytest" "-vvv" "parfive")))))))
(propagated-inputs (list python-aiofiles python-aioftp python-aiohttp
python-tqdm))
(native-inputs (list python-pytest
python-pytest-asyncio
python-pytest-cov
python-pytest-localserver
python-pytest-socket
python-setuptools-scm))
(home-page "https://parfive.readthedocs.io/")
(synopsis "HTTP and FTP parallel file downloader")
(description
"This package provides CLI tool and Python library @code{parallel} file
downloader using asyncio. parfive can handle downloading multiple files in
parallel as well as downloading each file in a number of chunks.
asciicast demo of parfive parfive works by creating a downloader object,
appending files to it and then running the download. parfive has a synchronous
API, but uses asyncio to paralellise downloading the files.")
(license license:expat)))
(define-public python-html2text
(package
(name "python-html2text")