nixpkgs/pkgs/development/python-modules/stone/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.2 KiB
Nix
Raw Normal View History

2021-04-20 22:59:00 +01:00
{ lib, buildPythonPackage, fetchPypi
, coverage
, mock
, ply
, pytest-runner
2021-04-20 22:59:00 +01:00
, pytestCheckHook
, six
}:
buildPythonPackage rec {
pname = "stone";
2022-03-02 21:42:27 +00:00
version = "3.3.1";
2021-04-20 22:59:00 +01:00
src = fetchPypi {
inherit pname version;
2022-03-02 21:42:27 +00:00
sha256 = "sha256-TvA5dRL2CXV5dffsCbNWOdcrp+PhfOTd85lXg0a0y1A=";
2021-04-20 22:59:00 +01:00
};
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner == 5.2.0" "pytest-runner" \
--replace "pytest < 5" "pytest"
substituteInPlace test/requirements.txt \
--replace "coverage==5.3" "coverage"
'';
nativeBuildInputs = [ pytest-runner ];
2021-04-20 22:59:00 +01:00
propagatedBuildInputs = [ ply six ];
checkInputs = [ pytestCheckHook coverage mock ];
# 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 ];
};
}