1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 unittestCheckHook,
7 setuptools,
8 django,
9}:
10
11buildPythonPackage rec {
12 pname = "django-cte";
13 version = "1.3.3";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "dimagi";
18 repo = "django-cte";
19 tag = "v${version}";
20 hash = "sha256-OCENg94xHBeeE4A2838Cu3q2am2im2X4SkFSjc6DuhE=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [ django ];
26
27 nativeCheckInputs = [ pytestCheckHook ];
28
29 disabledTests = [
30 # Require Database connection
31 "test_cte_queryset"
32 "test_experimental_left_outer_join"
33 "test_explain"
34 "test_left_outer_join_on_empty_result_set_cte"
35 "test_named_ctes"
36 "test_named_simple_ctes"
37 "test_non_cte_subquery"
38 "test_outerref_in_cte_query"
39 "test_simple_cte_query"
40 "test_update_cte_query"
41 "test_update_with_subquery"
42 "test_heterogeneous_filter_in_cte"
43 "test_raw_cte_sql"
44 "test_alias_as_subquery"
45 "test_alias_change_in_annotation"
46 "test_attname_should_not_mask_col_name"
47 "test_pickle_recursive_cte_queryset"
48 "test_recursive_cte_query"
49 "test_recursive_cte_reference_in_condition"
50 "test_union_with_first"
51 "test_union_with_select_related_and_first"
52 "test_union_with_select_related_and_order"
53 ];
54
55 pythonImportsCheck = [ "django_cte" ];
56
57 meta = {
58 description = "Common Table Expressions (CTE) for Django";
59 homepage = "https://github.com/dimagi/django-cte";
60 changelog = "https://github.com/dimagi/django-cte/blob/v${version}/CHANGELOG.md";
61 license = lib.licenses.bsd3;
62 maintainers = with lib.maintainers; [ jopejoe1 ];
63 };
64}