Skip to content

Commit

Permalink
python312Packages.hypothesmith: modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Sep 1, 2024
1 parent e08e458 commit 0e0552e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 110 deletions.
33 changes: 10 additions & 23 deletions pkgs/development/python-modules/hypothesmith/default.nix
Original file line number Diff line number Diff line change
@@ -1,65 +1,52 @@
{
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 ];
build-system = [ setuptools ];

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 = [
dependencies = [
hypothesis
lark
libcst
];

nativeCheckInputs = [
black
parso
pytestCheckHook
pytest-cov-stub
pytest-xdist
];

pytestFlagsArray = [ "-v" ];

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"
];

pythonImportsCheck = [ "hypothesmith" ];

meta = with lib; {
Expand Down
87 changes: 0 additions & 87 deletions pkgs/development/python-modules/hypothesmith/remove-black.patch

This file was deleted.

0 comments on commit 0e0552e

Please sign in to comment.