2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
azure-storage-blob,
|
|
|
|
boto3,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
django,
|
|
|
|
dropbox,
|
|
|
|
fetchFromGitHub,
|
|
|
|
google-cloud-storage,
|
|
|
|
libcloud,
|
|
|
|
moto,
|
|
|
|
paramiko,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
rsa,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-storages";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "1.14.4";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jschneier";
|
|
|
|
repo = "django-storages";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-nlM/XPot3auLzNsnHCVtog2WmiaibDRgbPOw9A5F9QI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ django ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
azure = [ azure-storage-blob ];
|
|
|
|
boto3 = [ boto3 ];
|
|
|
|
dropbox = [ dropbox ];
|
|
|
|
google = [ google-cloud-storage ];
|
|
|
|
libcloud = [ libcloud ];
|
|
|
|
s3 = [ boto3 ];
|
|
|
|
sftp = [ paramiko ];
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
cryptography
|
|
|
|
moto
|
|
|
|
pytestCheckHook
|
|
|
|
rsa
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "storages" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
env.DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AttributeError: 'str' object has no attribute 'universe_domain'
|
|
|
|
"test_storage_save_gzip"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# ImportError: cannot import name 'mock_s3' from 'moto'
|
|
|
|
"tests/test_s3.py"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Collection of custom storage backends for Django";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/jschneier/django-storages/blob/${version}/CHANGELOG.rst";
|
2023-11-16 04:20:00 +00:00
|
|
|
downloadPage = "https://github.com/jschneier/django-storages/";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://django-storages.readthedocs.io";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
};
|
|
|
|
}
|