Skip to content

Commit 6d05491

Browse files
committed
python311Packages.django-maintenance-mode: refactor
1 parent e094c34 commit 6d05491

File tree

1 file changed

+12
-12
lines changed
  • pkgs/development/python-modules/django-maintenance-mode

1 file changed

+12
-12
lines changed
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
{ lib
2-
, fetchFromGitHub
3-
, fetchpatch
42
, buildPythonPackage
53
, django
6-
, python-fsutil
4+
, fetchFromGitHub
75
, python
6+
, python-fsutil
87
, pythonOlder
8+
, setuptools
99
}:
1010

1111
buildPythonPackage rec {
1212
pname = "django-maintenance-mode";
1313
version = "0.19.0";
14-
format = "setuptools";
14+
pyproject = true;
1515

1616
disabled = pythonOlder "3.7";
1717

1818
src = fetchFromGitHub {
1919
owner = "fabiocaccamo";
20-
repo = pname;
20+
repo = "django-maintenance-mode";
2121
rev = "refs/tags/${version}";
2222
hash = "sha256-NAm3xMcHePTYxysihYj48bk7r9ykEtPcxPjSEju/zMM=";
2323
};
2424

25-
patches = [
26-
(fetchpatch {
27-
name = "fix-broken-test.patch";
28-
url = "https://github.com/fabiocaccamo/django-maintenance-mode/commit/68cde8d9ceef00eeaa2068f420698c1c562fa9fc.patch";
29-
hash = "sha256-K/zYYkcnmWGc7Knz4l9PgvUtT0IccPRXc3UFriC1ldc=";
30-
})
25+
nativeBuildInputs = [
26+
setuptools
3127
];
3228

3329
propagatedBuildInputs = [
@@ -43,11 +39,15 @@ buildPythonPackage rec {
4339
runHook postCheck
4440
'';
4541

42+
pythonImportsCheck = [
43+
"maintenance_mode"
44+
];
45+
4646
meta = with lib; {
4747
description = "Shows a 503 error page when maintenance-mode is on";
4848
homepage = "https://github.com/fabiocaccamo/django-maintenance-mode";
4949
changelog = "https://github.com/fabiocaccamo/django-maintenance-mode/releases/tag/${version}";
50-
maintainers = with maintainers; [ mrmebelman ];
5150
license = licenses.bsd3;
51+
maintainers = with maintainers; [ mrmebelman ];
5252
};
5353
}

0 commit comments

Comments
 (0)