1{ lib
2, anyascii
3, buildPythonPackage
4, fetchFromGitHub
5, fetchpatch
6, flaky
7, google-cloud-storage
8, mock
9, pillow
10, pymongo
11, pytestCheckHook
12, pythonOlder
13, requests
14, sqlalchemy
15}:
16
17buildPythonPackage rec {
18 pname = "filedepot";
19 version = "0.10.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "amol-";
26 repo = "depot";
27 rev = "refs/tags/${version}";
28 hash = "sha256-vPceky5cvmy3MooWz7dRdy68VoAHN7i3a7egBs4dPE8=";
29 };
30
31 patches = [
32 # Add support for Pillow 10, https://github.com/amol-/depot/pull/84
33 (fetchpatch {
34 name = "support-pillow-10.patch";
35 url = "https://github.com/amol-/depot/commit/bdb73d1b3898279068b421bc061ecc18c5108fa4.patch";
36 hash = "sha256-7+VGrdJstkiy0bYAqA9FjF1NftZiurgyPd8Wlz6GUy8=";
37 })
38 ];
39
40 propagatedBuildInputs = [
41 anyascii
42 google-cloud-storage
43 ];
44
45 nativeCheckInputs = [
46 flaky
47 mock
48 pillow
49 pymongo
50 pytestCheckHook
51 requests
52 sqlalchemy
53 ];
54
55 disabledTestPaths = [
56 # ModuleNotFoundError: No module named 'depot._pillow_compat'
57 "tests/test_fields_sqlalchemy.py"
58 # The examples have tests
59 "examples"
60 # Missing dependencies (TurboGears2 and ming)
61 "tests/test_fields_ming.py"
62 "tests/test_wsgi_middleware.py"
63 ];
64
65 pythonImportsCheck = [
66 "depot"
67 ];
68
69 meta = with lib; {
70 description = "Toolkit for storing files and attachments in web applications";
71 homepage = "https://github.com/amol-/depot";
72 changelog = "https://github.com/amol-/depot/releases/tag/${version}";
73 license = licenses.mit;
74 maintainers = with maintainers; [ fab ];
75 };
76}