diff options
Diffstat (limited to 'pkgs/development/python-modules/hypothesmith/default.nix')
-rw-r--r-- | pkgs/development/python-modules/hypothesmith/default.nix | 70 |
1 files changed, 32 insertions, 38 deletions
diff --git a/pkgs/development/python-modules/hypothesmith/default.nix b/pkgs/development/python-modules/hypothesmith/default.nix index 9aa3406c6006..fa40d34c8a82 100644 --- a/pkgs/development/python-modules/hypothesmith/default.nix +++ b/pkgs/development/python-modules/hypothesmith/default.nix @@ -1,58 +1,52 @@ -{ lib -, buildPythonPackage -, fetchPypi -, hypothesis -, lark -, libcst -, parso -, pytestCheckHook -, pytest-xdist -, pythonOlder +{ + lib, + black, + buildPythonPackage, + fetchPypi, + hypothesis, + lark, + libcst, + parso, + pytestCheckHook, + pytest-cov-stub, + pytest-xdist, + pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "hypothesmith"; version = "0.3.3"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; hash = "sha256-lsFIAtbI6F2JdSZBdoeNtUso0u2SH9v+3C5rjOPIFxY="; }; - patches = [ - ./remove-black.patch - ]; - - postPatch = '' - substituteInPlace setup.py \ - --replace "lark-parser" "lark" - - substituteInPlace tox.ini \ - --replace "--cov=hypothesmith" "" \ - --replace "--cov-branch" "" \ - --replace "--cov-report=term-missing:skip-covered" "" \ - --replace "--cov-fail-under=100" "" - ''; - - propagatedBuildInputs = [ hypothesis lark libcst ]; + build-system = [ setuptools ]; - nativeCheckInputs = [ parso pytestCheckHook pytest-xdist ]; + dependencies = [ + hypothesis + lark + libcst + ]; - pytestFlagsArray = [ - "-v" + nativeCheckInputs = [ + black + parso + pytestCheckHook + pytest-cov-stub + pytest-xdist ]; disabledTests = [ - # https://github.com/Zac-HD/hypothesmith/issues/21 + # super slow "test_source_code_from_libcst_node_type" - ]; - - disabledTestPaths = [ - # missing blib2to3 - "tests/test_syntactic.py" + # https://github.com/Zac-HD/hypothesmith/issues/38 + "test_black_autoformatter_from_grammar" ]; pythonImportsCheck = [ "hypothesmith" ]; @@ -62,6 +56,6 @@ buildPythonPackage rec { homepage = "https://github.com/Zac-HD/hypothesmith"; changelog = "https://github.com/Zac-HD/hypothesmith/blob/master/CHANGELOG.md"; license = licenses.mpl20; - maintainers = with maintainers; [ ]; + maintainers = [ ]; }; } |