2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonAtLeast,
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
django,
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
factory-boy,
|
|
|
|
mock,
|
|
|
|
pip,
|
|
|
|
pygments,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-django,
|
|
|
|
shortuuid,
|
|
|
|
vobject,
|
|
|
|
werkzeug,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-extensions";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "3.2.3";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
# https://github.com/django-extensions/django-extensions/issues/1831
|
|
|
|
# Requires asyncore, which was dropped in 3.12
|
|
|
|
disabled = pythonAtLeast "3.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-A2+5FBv0IhTJPkwgd7je+B9Ac64UHJEa3HRBbWr2FxM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=django_extensions --cov-report html --cov-report term" ""
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [ django ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-10-19 13:55:26 +00:00
|
|
|
factory-boy
|
2020-04-24 23:36:52 +00:00
|
|
|
mock
|
2023-08-22 20:05:09 +00:00
|
|
|
pip
|
2020-04-24 23:36:52 +00:00
|
|
|
pygments # not explicitly declared in setup.py, but some tests require it
|
|
|
|
pytest-django
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
shortuuid
|
|
|
|
vobject
|
|
|
|
werkzeug
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# requires network access
|
|
|
|
"tests/management/commands/test_pipchecker.py"
|
2024-04-21 15:54:59 +00:00
|
|
|
# django.db.utils.OperationalError: no such table: django_extensions_permmodel
|
|
|
|
"tests/test_dumpscript.py"
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A collection of custom extensions for the Django Framework";
|
|
|
|
homepage = "https://github.com/django-extensions/django-extensions";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|