depot/third_party/nixpkgs/pkgs/development/python-modules/django-compressor/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

80 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
# build-system
setuptools,
# dependencies
calmjs,
django-appconf,
jinja2,
rcssmin,
rjsmin,
# tests
beautifulsoup4,
brotli,
csscompressor,
django-sekizai,
pytestCheckHook,
pytest-django,
}:
buildPythonPackage rec {
pname = "django-compressor";
version = "4.5";
pyproject = true;
src = fetchPypi {
pname = "django_compressor";
inherit version;
hash = "sha256-nZjJBbdBvmywmtgowdIqn/kkTdCII+KSavjd0YccPGU=";
};
build-system = [
setuptools
];
pythonRelaxDeps = [
"rcssmin"
"rjsmin"
];
dependencies = [
beautifulsoup4
calmjs
django-appconf
jinja2
rcssmin
rjsmin
];
env.DJANGO_SETTINGS_MODULE = "compressor.test_settings";
nativeCheckInputs = [
beautifulsoup4
brotli
csscompressor
django-sekizai
pytestCheckHook
pytest-django
];
# Getting error: compressor.exceptions.OfflineGenerationError: You have
# offline compression enabled but key "..." is missing from offline manifest.
# You may need to run "python manage.py compress"
disabledTestPaths = [ "compressor/tests/test_offline.py" ];
pythonImportsCheck = [ "compressor" ];
meta = with lib; {
description = "Compresses linked and inline JavaScript or CSS into single cached files";
homepage = "https://django-compressor.readthedocs.org/";
changelog = "https://github.com/django-compressor/django-compressor/blob/${version}/docs/changelog.txt";
license = licenses.mit;
maintainers = with maintainers; [ desiderius ];
};
}