Files
tioan 97fbf8fdc2 python3Packages.django-currentuser: relax setuptools build constraint
Assisted-by: Claude Code (Claude Opus 5.5)
(cherry picked from commit 21faf35ff2)
2026-11-26 19:51:42 +00:00

58 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
django,
fetchFromGitHub,
hatchling,
pyhamcrest,
python,
setuptools,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "django-currentuser";
version = "0.10.0";
pyproject = true;
src = fetchFromGitHub {
owner = "zsoldosp";
repo = "django-currentuser";
tag = "v${version}";
hash = "sha256-1fg1KRu685hnAyHCOKKqvwU/K8Sm4D7/TRKLBI2tBu0=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"setuptools<81"' '"setuptools"'
'';
build-system = [
setuptools
setuptools-scm
];
dependencies = [ django ];
nativeCheckInputs = [ pyhamcrest ];
preCheck = ''
DJANGO_SETTINGS_MODULE="settings"
PYTHONPATH="tests:$PYTHONPATH"
'';
checkPhase = ''
runHook preCheck
${python.interpreter} manage.py test testapp
runHook postCheck
'';
meta = {
description = "Conveniently store reference to request user on thread/db level";
homepage = "https://github.com/zsoldosp/django-currentuser";
changelog = "https://github.com/zsoldosp/django-currentuser/#release-notes";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ augustebaum ];
};
}