summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/bottle/default.nix
blob: 8c7d962139f1d91456c5dbc6f50f4cbdea2f7c8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools,
  pytestCheckHook,
  pythonAtLeast,
}:

buildPythonPackage rec {
  pname = "bottle";
  version = "0.13.4";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-eH54Mn4SsieTjeAiSDM9eIz+RZh+3Kc1+PiOA0csP0c=";
  };

  nativeBuildInputs = [ setuptools ];

  nativeCheckInputs = [ pytestCheckHook ];

  preCheck = ''
    cd test
  '';

  disabledTests = [
    "test_delete_cookie"
    "test_error"
    "test_error_in_generator_callback"
    # timing sensitive
    "test_ims"
  ]
  ++ lib.optionals (pythonAtLeast "3.12") [
    # https://github.com/bottlepy/bottle/issues/1422
    # ModuleNotFoundError: No module named 'bottle.ext'
    "test_data_import"
    "test_direkt_import"
    "test_from_import"
  ];

  __darwinAllowLocalNetworking = true;

  meta = {
    homepage = "https://bottlepy.org/";
    description = "Fast and simple micro-framework for small web-applications";
    mainProgram = "bottle.py";
    downloadPage = "https://github.com/bottlepy/bottle";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ koral ];
  };
}