mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-18 22:10:45 +08:00
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
82 lines
1.9 KiB
Nix
82 lines
1.9 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, aenum
|
|
, aiohttp
|
|
, importlib-metadata
|
|
, isodate
|
|
, nest-asyncio
|
|
, pytestCheckHook
|
|
, mock
|
|
, pyhamcrest
|
|
, radish-bdd
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "gremlinpython";
|
|
version = "3.6.1";
|
|
|
|
# pypi tarball doesn't include tests
|
|
src = fetchFromGitHub {
|
|
owner = "apache";
|
|
repo = "tinkerpop";
|
|
rev = version;
|
|
sha256 = "sha256-FMA9hJdq7gYkDtQO04Bwpjq2Q7nXGuN9wrBD4b9GgwY=";
|
|
};
|
|
|
|
sourceRoot = "source/gremlin-python/src/main/python";
|
|
|
|
postPatch = ''
|
|
sed -i '/pytest-runner/d' setup.py
|
|
|
|
substituteInPlace setup.py \
|
|
--replace 'aiohttp>=3.8.0,<=3.8.1' 'aiohttp' \
|
|
--replace 'importlib-metadata<5.0.0' 'importlib-metadata'
|
|
'';
|
|
|
|
# setup-requires requirements
|
|
nativeBuildInputs = [
|
|
importlib-metadata
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aenum
|
|
aiohttp
|
|
isodate
|
|
nest-asyncio
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
mock
|
|
pyhamcrest
|
|
radish-bdd
|
|
];
|
|
|
|
# disable custom pytest report generation
|
|
preCheck = ''
|
|
substituteInPlace setup.cfg --replace 'addopts' '#addopts'
|
|
export TEST_TRANSACTIONS='false'
|
|
'';
|
|
|
|
# many tests expect a running tinkerpop server
|
|
disabledTestPaths = [
|
|
"tests/driver/test_client.py"
|
|
"tests/driver/test_driver_remote_connection.py"
|
|
"tests/driver/test_driver_remote_connection_threaded.py"
|
|
"tests/process/test_dsl.py"
|
|
"tests/structure/io/test_functionalityio.py"
|
|
];
|
|
pytestFlagsArray = [
|
|
# disabledTests doesn't quite allow us to be precise enough for this
|
|
"-k 'not (TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid))'"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Gremlin-Python implements Gremlin, the graph traversal language of Apache TinkerPop, within the Python language";
|
|
homepage = "https://tinkerpop.apache.org/";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ turion ris ];
|
|
};
|
|
}
|