depot/third_party/nixpkgs/pkgs/development/python-modules/django-bootstrap5/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

67 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 ];
};
}