python310Packages.django-mailman: fix build

This commit is contained in:
Martin Weinelt 2023-07-26 00:27:44 +02:00
parent 79105aad78
commit 0116a04d7b
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -1,27 +1,50 @@
{ lib, buildPythonPackage, fetchPypi, django-gravatar2, django-compressor
, django-allauth, mailmanclient, django, mock
{ lib
, buildPythonPackage
, fetchPypi
# propagates
, django-gravatar2
, django-allauth
, mailmanclient
, pytz
# tests
, django
, pytest-django
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "django-mailman3";
version = "1.3.9";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-GpI1W0O9aJpLF/mcS23ktJDZsP69S2zQy7drOiWBnTM=";
};
propagatedBuildInputs = [
django-gravatar2 django-compressor django-allauth mailmanclient
];
nativeCheckInputs = [ django mock ];
checkPhase = ''
cd $NIX_BUILD_TOP/$sourceRoot
PYTHONPATH=.:$PYTHONPATH django-admin.py test --settings=django_mailman3.tests.settings_test
postPatch = ''
substituteInPlace setup.py \
--replace 'django>=3.2,<4.2' 'django>=3.2,<4.3'
'';
pythonImportsCheck = [ "django_mailman3" ];
propagatedBuildInputs = [
django-allauth
django-gravatar2
mailmanclient
pytz
];
nativeCheckInputs = [
django
pytest-django
pytestCheckHook
];
pythonImportsCheck = [
"django_mailman3"
];
meta = with lib; {
description = "Django library for Mailman UIs";