mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
python312Packages.sqlalchemy-file: init at 0.6.0
This commit is contained in:
78
pkgs/development/python-modules/sqlalchemy-file/default.nix
Normal file
78
pkgs/development/python-modules/sqlalchemy-file/default.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
hatchling,
|
||||
fasteners,
|
||||
libcloud,
|
||||
pillow,
|
||||
pytestCheckHook,
|
||||
sqlalchemy,
|
||||
sqlmodel,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sqlalchemy-file";
|
||||
version = "0.6.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jowilf";
|
||||
repo = "sqlalchemy-file";
|
||||
rev = version;
|
||||
hash = "sha256-gtW7YA/rQ48tnqPdypMnSqqtwb90nhAkiQNhgEr1M3I=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
libcloud
|
||||
sqlalchemy
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
fasteners
|
||||
pillow
|
||||
sqlmodel
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# used in get_test_container in tests/utils.py
|
||||
# fixes FileNotFoundError: [Errno 2] No such file or directory: '/tmp/storage/...'
|
||||
mkdir .storage
|
||||
export LOCAL_PATH="$PWD/.storage"
|
||||
'';
|
||||
|
||||
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
||||
# very flaky, sandbox issues?
|
||||
# libcloud.storage.types.ContainerDoesNotExistError
|
||||
# sqlite3.OperationalError: attempt to write a readonly database
|
||||
"tests/test_content_type_validator.py"
|
||||
"tests/test_image_field.py"
|
||||
"tests/test_image_validator.py"
|
||||
"tests/test_metadata.py"
|
||||
"tests/test_multiple_field.py"
|
||||
"tests/test_multiple_storage.py"
|
||||
"tests/test_processor.py"
|
||||
"tests/test_single_field.py"
|
||||
"tests/test_size_validator.py"
|
||||
"tests/test_sqlmodel.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"sqlalchemy_file"
|
||||
"sqlalchemy_file.file"
|
||||
"sqlalchemy_file.types"
|
||||
"sqlalchemy_file.helpers"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "SQLAlchemy extension for attaching files to SQLAlchemy model and uploading them to various storage with Apache Libcloud";
|
||||
homepage = "https://github.com/jowilf/sqlalchemy-file";
|
||||
changelog = "https://github.com/jowilf/sqlalchemy-file/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ pbsds ];
|
||||
};
|
||||
}
|
||||
@@ -14864,6 +14864,8 @@ self: super: with self; {
|
||||
|
||||
sqlalchemy-continuum = callPackage ../development/python-modules/sqlalchemy-continuum { };
|
||||
|
||||
sqlalchemy-file = callPackage ../development/python-modules/sqlalchemy-file { };
|
||||
|
||||
sqlalchemy-i18n = callPackage ../development/python-modules/sqlalchemy-i18n { };
|
||||
|
||||
sqlalchemy-jsonfield = callPackage ../development/python-modules/sqlalchemy-jsonfield { };
|
||||
|
||||
Reference in New Issue
Block a user