python3Packages.censys: 1.1.1 -> 2.0.3
This commit is contained in:
parent
6d20dc7421
commit
9282b2f5a4
1 changed files with 26 additions and 13 deletions
|
@ -2,49 +2,62 @@
|
|||
, backoff
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, requests
|
||||
, pytestcov
|
||||
, requests-mock
|
||||
, parameterized
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, requests
|
||||
, requests-mock
|
||||
, responses
|
||||
, rich
|
||||
, types-requests
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "censys";
|
||||
version = "1.1.1";
|
||||
version = "2.0.3";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "censys";
|
||||
repo = "censys-python";
|
||||
rev = version;
|
||||
sha256 = "06jwk0ps80fjzbsy24qn5bsggfpgn4ccjzjz65cdh0ap1mfvh5jf";
|
||||
rev = "v${version}";
|
||||
sha256 = "0ga5f6xv6rylfvalnl3cflr0w30r771gb05n5cjhxisb8an0qcb6";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
backoff
|
||||
requests
|
||||
rich
|
||||
types-requests
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestcov
|
||||
parameterized
|
||||
pytestCheckHook
|
||||
requests-mock
|
||||
parameterized
|
||||
responses
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "rich==10.3.0" "rich" \
|
||||
--replace "types-requests==0.1.11" "types-requests"
|
||||
substituteInPlace pytest.ini --replace \
|
||||
" --cov -rs -p no:warnings" ""
|
||||
'';
|
||||
|
||||
# The tests want to write a configuration file
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
mkdir -p $HOME
|
||||
'';
|
||||
# All other tests require an API key
|
||||
pytestFlagsArray = [ "tests/test_config.py" ];
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "censys" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python API wrapper for the Censys Search Engine (censys.io)";
|
||||
homepage = "https://github.com/censys/censys-python";
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = [ maintainers.fab ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue