2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-04-26 19:14:03 +00:00
|
|
|
, mock
|
|
|
|
, ply
|
|
|
|
, pytestCheckHook
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stone";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "3.3.1";
|
|
|
|
|
|
|
|
# pypi sdist misses requirements.txt
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dropbox";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-0FWdYbv+paVU3Wj6g9OrSNUB0pH8fLwTkhVIBPeFB/U=";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-04-15 01:41:22 +00:00
|
|
|
sed -i '/pytest-runner/d' setup.py
|
2021-04-26 19:14:03 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ ply six ];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
checkInputs = [ pytestCheckHook mock ];
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
# try to import from `test` directory, which is exported by the python interpreter
|
|
|
|
# and cannot be overriden without removing some py3 to py2 support
|
|
|
|
disabledTestPaths = [
|
|
|
|
"test/test_tsd_types.py"
|
|
|
|
"test/test_js_client.py"
|
|
|
|
];
|
|
|
|
disabledTests = [
|
|
|
|
"test_type_name_with_module"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "stone" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Official Api Spec Language for Dropbox";
|
|
|
|
homepage = "https://github.com/dropbox/stone";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|