1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 pytestCheckHook,
7 pythonAtLeast,
8}:
9
10buildPythonPackage rec {
11 pname = "bottle";
12 version = "0.12.25";
13 pyproject = true;
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-4anJSXCubXELP7RSYpTf64byy0qB7/OkuY3ED7Dl4CE=";
18 };
19
20 nativeBuildInputs = [ setuptools ];
21
22 nativeCheckInputs = [ pytestCheckHook ];
23
24 preCheck = ''
25 cd test
26 '';
27
28 disabledTests =
29 [
30 "test_delete_cookie"
31 "test_error"
32 "test_error_in_generator_callback"
33 # timing sensitive
34 "test_ims"
35 ]
36 ++ lib.optionals (pythonAtLeast "3.12") [
37 # https://github.com/bottlepy/bottle/issues/1422
38 # ModuleNotFoundError: No module named 'bottle.ext'
39 "test_data_import"
40 "test_direkt_import"
41 "test_from_import"
42 ];
43
44 __darwinAllowLocalNetworking = true;
45
46 meta = with lib; {
47 homepage = "https://bottlepy.org/";
48 description = "A fast and simple micro-framework for small web-applications";
49 mainProgram = "bottle.py";
50 downloadPage = "https://github.com/bottlepy/bottle";
51 license = licenses.mit;
52 maintainers = with maintainers; [ koral ];
53 };
54}