Merge pull request #134044 from fabaff/bump-howdoi

This commit is contained in:
Sandro 2021-08-15 01:47:11 +02:00 committed by GitHub
commit 938ca6aa75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,43 +1,61 @@
{ lib
, appdirs
, buildPythonPackage
, fetchPypi
, six
, cachelib
, cssselect
, fetchFromGitHub
, keep
, lxml
, pygments
, pyquery
, cachelib
, appdirs
, keep
, requests
, six
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "howdoi";
version = "2.0.16";
version = "2.0.17";
src = fetchPypi {
inherit pname version;
sha256 = "0257fbb328eb3a15ed3acc498314902f00908b130209073509eec21cb7235b2b";
src = fetchFromGitHub {
owner = "gleitz";
repo = pname;
rev = "v${version}";
sha256 = "1cc9hbnalbsd5la9wsm8s6drb79vlzin9qnv86ic81r5nq27n180";
};
postPatch = ''
substituteInPlace setup.py --replace 'cachelib==0.1' 'cachelib'
'';
propagatedBuildInputs = [
appdirs
cachelib
cssselect
keep
lxml
pygments
pyquery
requests
six
];
propagatedBuildInputs = [ six pygments pyquery cachelib appdirs keep ];
checkInputs = [
pytestCheckHook
];
# author hasn't included page_cache directory (which allows tests to run without
# external requests) in pypi tarball. github repo doesn't have release revisions
# clearly tagged. re-enable tests when either is sorted.
doCheck = false;
preCheck = ''
mv howdoi _howdoi
export HOME=$(mktemp -d)
'';
disabledTests = [
# AssertionError: "The...
"test_get_text_with_one_link"
"test_get_text_without_links"
];
pythonImportsCheck = [ "howdoi" ];
meta = with lib; {
description = "Instant coding answers via the command line";
homepage = "https://pypi.python.org/pypi/howdoi";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
maintainers = with maintainers; [ costrouc ];
};
}