1{
2 lib,
3 black,
4 buildPythonPackage,
5 fetchPypi,
6 hypothesis,
7 lark,
8 libcst,
9 parso,
10 pytestCheckHook,
11 pytest-cov-stub,
12 pytest-xdist,
13 pythonOlder,
14 setuptools,
15}:
16
17buildPythonPackage rec {
18 pname = "hypothesmith";
19 version = "0.3.3";
20 pyproject = true;
21
22 disabled = pythonOlder "3.9";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-lsFIAtbI6F2JdSZBdoeNtUso0u2SH9v+3C5rjOPIFxY=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 hypothesis
33 lark
34 libcst
35 ];
36
37 nativeCheckInputs = [
38 black
39 parso
40 pytestCheckHook
41 pytest-cov-stub
42 pytest-xdist
43 ];
44
45 disabledTests = [
46 # super slow
47 "test_source_code_from_libcst_node_type"
48 # https://github.com/Zac-HD/hypothesmith/issues/38
49 "test_black_autoformatter_from_grammar"
50 ];
51
52 pythonImportsCheck = [ "hypothesmith" ];
53
54 meta = with lib; {
55 description = "Hypothesis strategies for generating Python programs, something like CSmith";
56 homepage = "https://github.com/Zac-HD/hypothesmith";
57 changelog = "https://github.com/Zac-HD/hypothesmith/blob/master/CHANGELOG.md";
58 license = licenses.mpl20;
59 maintainers = [ ];
60 };
61}