depot/third_party/nixpkgs/pkgs/development/python-modules/django-bootstrap5/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

66 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build-system
setuptools,
setuptools-scm,
# dependencies
django,
# tests
beautifulsoup4,
pillow,
pytest-django,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "django-bootstrap5";
version = "24.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "zostera";
repo = "django-bootstrap5";
rev = "v${version}";
hash = "sha256-JbmwEPkj34tsK3tUtb56FPjU0emwERVXEc4fzlepdXY=";
};
build-system = [
setuptools
setuptools-scm
];
nativeCheckInputs = [
beautifulsoup4
(django.override { withGdal = true; })
pillow
pytest-django
pytestCheckHook
];
preCheck = ''
export DJANGO_SETTINGS_MODULE=tests.app.settings
'';
disabledTests = [
# urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
"test_get_bootstrap_setting"
];
pythonImportsCheck = [ "django_bootstrap5" ];
meta = with lib; {
description = "Bootstrap 5 integration with Django";
homepage = "https://github.com/zostera/django-bootstrap5";
changelog = "https://github.com/zostera/django-bootstrap5/blob/${src.rev}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ netali ];
};
}