mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
python310Packages.django-maintenance-mode: fix build
It can't be tested using pythonImportsCheck because it can't be imported without being inside of a Django app.
This commit is contained in:
parent
60fa9e3f4f
commit
06a0c1c7e4
|
@ -1,9 +1,10 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, buildPythonPackage
|
||||
, pytest
|
||||
, django
|
||||
, python-fsutil
|
||||
, python
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
|
@ -21,18 +22,26 @@ buildPythonPackage rec {
|
|||
hash = "sha256-Mcj8O20hCINGf5T3PCG9jq0onSrm4R+Ke5CLMqMDmuU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "fix-broken-test.patch";
|
||||
url = "https://github.com/fabiocaccamo/django-maintenance-mode/commit/68cde8d9ceef00eeaa2068f420698c1c562fa9fc.patch";
|
||||
hash = "sha256-K/zYYkcnmWGc7Knz4l9PgvUtT0IccPRXc3UFriC1ldc=";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
django
|
||||
python-fsutil
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest
|
||||
];
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
pythonImportsCheck = [
|
||||
"maintenance_mode"
|
||||
];
|
||||
${python.interpreter} runtests.py
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Shows a 503 error page when maintenance-mode is on";
|
||||
|
|
Loading…
Reference in a new issue