python3Packages.django-ipware: format to pyproject (#551207)

This commit is contained in:
Yohann Boniface
2026-08-13 00:04:28 +00:00
committed by GitHub

View File

@@ -1,28 +1,41 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
django,
python-ipware,
setuptools,
pytestCheckHook,
pytest-django,
}:
buildPythonPackage rec {
pname = "django-ipware";
version = "7.0.1";
format = "setuptools";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-2exD0r983yFv7Y1JSghN61dhpUhgpTsudDRqTzhM/0c=";
src = fetchFromGitHub {
owner = "un33k";
repo = "django-ipware";
tag = "v${version}";
hash = "sha256-jLEHhJ6oNT1tsSqMbfPw1tb2Z/iQa8V6LpbT4ChLKI4=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
django
python-ipware
];
# django.core.exceptions.ImproperlyConfigured: Requested setting IPWARE_TRUSTED_PROXY_LIST, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
doCheck = false;
env.DJANGO_SETTINGS_MODULE = "ipware.tests.testsettings";
nativeCheckInputs = [
pytestCheckHook
pytest-django
];
enabledTestPaths = [ "ipware/tests/tests*.py" ];
# pythonImportsCheck fails with:
# django.core.exceptions.ImproperlyConfigured: Requested setting IPWARE_META_PRECEDENCE_ORDER, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.