mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
python3Packages.censys: 1.1.1 -> 2.0.3
This commit is contained in:
parent
6d20dc7421
commit
9282b2f5a4
|
@ -2,49 +2,62 @@
|
||||||
, backoff
|
, backoff
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, pytestCheckHook
|
|
||||||
, requests
|
|
||||||
, pytestcov
|
|
||||||
, requests-mock
|
|
||||||
, parameterized
|
, parameterized
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, requests
|
||||||
|
, requests-mock
|
||||||
|
, responses
|
||||||
|
, rich
|
||||||
|
, types-requests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "censys";
|
pname = "censys";
|
||||||
version = "1.1.1";
|
version = "2.0.3";
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "censys";
|
owner = "censys";
|
||||||
repo = "censys-python";
|
repo = "censys-python";
|
||||||
rev = version;
|
rev = "v${version}";
|
||||||
sha256 = "06jwk0ps80fjzbsy24qn5bsggfpgn4ccjzjz65cdh0ap1mfvh5jf";
|
sha256 = "0ga5f6xv6rylfvalnl3cflr0w30r771gb05n5cjhxisb8an0qcb6";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
backoff
|
backoff
|
||||||
requests
|
requests
|
||||||
|
rich
|
||||||
|
types-requests
|
||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytestcov
|
parameterized
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
requests-mock
|
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
|
# The tests want to write a configuration file
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
mkdir -p $HOME
|
mkdir -p $HOME
|
||||||
'';
|
'';
|
||||||
# All other tests require an API key
|
|
||||||
pytestFlagsArray = [ "tests/test_config.py" ];
|
|
||||||
pythonImportsCheck = [ "censys" ];
|
pythonImportsCheck = [ "censys" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Python API wrapper for the Censys Search Engine (censys.io)";
|
description = "Python API wrapper for the Censys Search Engine (censys.io)";
|
||||||
homepage = "https://github.com/censys/censys-python";
|
homepage = "https://github.com/censys/censys-python";
|
||||||
license = with licenses; [ asl20 ];
|
license = with licenses; [ asl20 ];
|
||||||
maintainers = [ maintainers.fab ];
|
maintainers = with maintainers; [ fab ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue