python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / naked / default.nix
blobadabd6c6f5aa0e8a375a7713c5f7fa724cec9f00
2   buildPythonPackage,
3   python,
4   fetchFromGitHub,
5   lib,
6   requests,
7   pyyaml,
8   setuptools,
9   wheel,
10   nodejs,
11   ruby,
12   pytestCheckHook,
15 buildPythonPackage rec {
16   pname = "naked";
17   version = "0.1.32";
18   pyproject = true;
20   src = fetchFromGitHub {
21     owner = "chrissimpkins";
22     repo = "naked";
23     rev = "v${version}";
24     hash = "sha256-KhygnURFggvUTR9wwWtORtfQES8ANd5sIaCONvIhfRM=";
25   };
27   postPatch = ''
28     # fix hardcoded absolute paths
29     substituteInPlace tests/test_SYSTEM*.py \
30       --replace-fail /Users/ces/Desktop/code/naked/tests/ "$PWD"/tests/
31     substituteInPlace lib/Naked/toolshed/c/*.c \
32       --replace-fail /Users/ces/Desktop/code/naked/lib/ $out/${python.sitePackages}/
33   '';
35   nativeBuildInputs = [
36     wheel
37     setuptools
38   ];
40   propagatedBuildInputs = [
41     requests
42     pyyaml
43   ];
45   nativeCheckInputs = [
46     pytestCheckHook
47     nodejs
48     ruby
49   ];
51   preCheck = ''
52     cd tests
54     PATH=$PATH:$out/bin
55   '';
57   disabledTestPaths = [ "testfiles" ];
59   disabledTests = [
60     # test_NETWORK.py
61     "test_http_get"
62     "test_http_get_binary_file_absent"
63     "test_http_get_binary_file_exists"
64     "test_http_get_bin_type"
65     "test_http_get_follow_redirects"
66     "test_http_get_follow_redirects_false_content"
67     "test_http_get_follow_redirects_false_on_nofollow_arg"
68     "test_http_get_response_check_200"
69     "test_http_get_response_check_301"
70     "test_http_get_response_check_404"
71     "test_http_get_response_obj_present"
72     "test_http_get_ssl"
73     "test_http_get_status_check_true"
74     "test_http_get_status_ssl"
75     "test_http_get_status_ssl_redirect"
76     "test_http_get_text_absent"
77     "test_http_get_text_exists_request_overwrite"
78     "test_http_get_type"
79     "test_http_post"
80     "test_http_post_binary_file_absent"
81     "test_http_post_binary_file_present"
82     "test_http_post_binary_file_present_request_overwrite"
83     "test_http_post_reponse_status_200"
84     "test_http_post_response_status_200_ssl"
85     "test_http_post_ssl"
86     "test_http_post_status_check_true"
87     "test_http_post_text_file_absent"
88     "test_http_post_text_file_present_request_overwrite"
89     "test_http_post_type"
90     # test_SHELL.py
91     "test_muterun_missing_option_exitcode"
92     # test_SYSTEM.py
93     "test_sys_list_all_files"
94     "test_sys_list_all_files_cwd"
95     "test_sys_list_all_files_emptydir"
96     "test_sys_list_filter_files"
97     "test_sys_match_files"
98     "test_sys_match_files_fullpath"
99     "test_sys_meta_file_mod"
100     # test_TYPES.py
101     "test_xdict_key_random"
102     "test_xdict_key_random_sample"
103   ];
105   pythonImportsCheck = [ "Naked" ];
107   meta = with lib; {
108     description = "Python command line application framework";
109     homepage = "https://github.com/chrissimpkins/naked";
110     downloadPage = "https://github.com/chrissimpkins/naked/tags";
111     license = licenses.mit;
112     maintainers = [ maintainers.lucasew ];
113   };