summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/filedepot/default.nix
blob: 6719ee64f0c57084a6a3c918174810cd7b503d4b (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
  lib,
  anyascii,
  buildPythonPackage,
  fetchFromGitHub,
  flaky,
  google-cloud-storage,
  legacy-cgi,
  mock,
  pillow,
  pymongo,
  pytestCheckHook,
  pythonAtLeast,
  requests,
  setuptools,
  sqlalchemy,
}:

buildPythonPackage rec {
  pname = "filedepot";
  version = "0.11.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "amol-";
    repo = "depot";
    tag = version;
    hash = "sha256-693H/u+Wg2G9sdoUkC6DQo9WkmIlKnh8NKv3ufK/eyQ=";
  };

  build-system = [ setuptools ];

  dependencies = [
    anyascii
    legacy-cgi
    google-cloud-storage
  ];

  nativeCheckInputs = [
    flaky
    mock
    pillow
    pymongo
    pytestCheckHook
    requests
    sqlalchemy
  ];

  disabledTestPaths = [
    # ModuleNotFoundError: No module named 'depot._pillow_compat'
    "tests/test_fields_sqlalchemy.py"
    # The examples have tests
    "examples"
    # Missing dependencies (TurboGears2 and ming)
    "tests/test_fields_ming.py"
    "tests/test_wsgi_middleware.py"
  ];

  disabledTests = lib.optionals (pythonAtLeast "3.13") [ "test_notexisting" ];

  pythonImportsCheck = [ "depot" ];

  meta = {
    description = "Toolkit for storing files and attachments in web applications";
    homepage = "https://github.com/amol-/depot";
    changelog = "https://github.com/amol-/depot/releases/tag/${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}