diff options
author | Florian Brandes <florian.brandes@posteo.de> | 2022-08-08 16:15:28 +0200 |
---|---|---|
committer | Florian Brandes <florian.brandes@posteo.de> | 2022-08-10 10:21:19 +0200 |
commit | ea860254b74c0c91beffbbee96ebc0a825b84139 (patch) | |
tree | 2b0a1d145fc08724adab165e4c967d362c419dfa /pkgs/development/python-modules/django-q | |
parent | d2a4e79a6d07ab10156b88f5fd1827d6af1f215c (diff) |
python3Packages.django-q: add gador as maintainer, switch to GitHub
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
Diffstat (limited to 'pkgs/development/python-modules/django-q')
-rw-r--r-- | pkgs/development/python-modules/django-q/default.nix | 72 | ||||
-rw-r--r-- | pkgs/development/python-modules/django-q/pep-621.patch | 32 |
2 files changed, 97 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/django-q/default.nix b/pkgs/development/python-modules/django-q/default.nix index f81fc01bdd6f8..a6ebb5714d9d8 100644 --- a/pkgs/development/python-modules/django-q/default.nix +++ b/pkgs/development/python-modules/django-q/default.nix @@ -1,24 +1,82 @@ -{ lib, buildPythonPackage, fetchPypi, django-picklefield, arrow -, blessed, django, future }: +{ arrow +, blessed +, buildPythonPackage +, croniter +, django +, django-redis +, django-picklefield +, fetchFromGitHub +, future +, lib +, poetry-core +, pytest-django +, pytest-mock +, pytestCheckHook +, pkgs +, stdenv +}: buildPythonPackage rec { pname = "django-q"; version = "1.3.9"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "5c6b4d530aa3aabf9c6aa57376da1ca2abf89a1562b77038b7a04e52a4a0a91b"; + src = fetchFromGitHub { + owner = "Koed00"; + repo = "django-q"; + sha256 = "sha256-gFSrAl3QGoJEJfvTTvLQgViPPjeJ6BfvgEwgLLo+uAA="; + rev = "v${version}"; }; + nativeBuildInputs = [ poetry-core ]; + propagatedBuildInputs = [ - django-picklefield arrow blessed django future + django-picklefield + arrow + blessed + django + future + ]; + + # fixes empty version string + # analog to https://github.com/NixOS/nixpkgs/pull/171200 + patches = [ + ./pep-621.patch + ]; + + pythonImportsCheck = [ + "django_q" + ]; + + preCheck = '' + ${pkgs.redis}/bin/redis-server & + REDIS_PID=$! + ''; + + postCheck = '' + kill $REDIS_PID + ''; + + checkInputs = [ + croniter + django-redis + pytest-django + pytest-mock + pytestCheckHook + ]; + + # don't bother with two more servers to test + disabledTests = [ + "test_disque" + "test_mongo" ]; - doCheck = false; + doCheck = !stdenv.isDarwin; meta = with lib; { description = "A multiprocessing distributed task queue for Django"; homepage = "https://django-q.readthedocs.org"; license = licenses.mit; + maintainers = with maintainers; [ gador ]; }; } diff --git a/pkgs/development/python-modules/django-q/pep-621.patch b/pkgs/development/python-modules/django-q/pep-621.patch new file mode 100644 index 0000000000000..e0a1568f4825c --- /dev/null +++ b/pkgs/development/python-modules/django-q/pep-621.patch @@ -0,0 +1,32 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 9a83e90..0cdffaf 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,16 +1,12 @@ +-[tool.poetry] ++[project] + name = "django-q" + version = "1.3.9" + description = "A multiprocessing distributed task queue for Django" +-authors = ["Ilan Steemers <koed00@gmail.com>"] +-maintainers = ["Ilan Steemers <koed00@gmail.com>"] +-license = "MIT" ++authors = [ { name = "Ilan Steemers", email = "koed00@gmail.com"} ] ++maintainers = [ { name = "Ilan Steemers", email = "koed00@gmail.com"} ] ++license.text = "MIT" + readme = 'README.rst' + +-repository = "https://github.com/koed00/django-q" +-homepage = "https://django-q.readthedocs.org" +-documentation = "https://django-q.readthedocs.org" +- + keywords = ["django", "distributed", "multiprocessing", "queue", "scheduler"] + + classifiers = [ +@@ -31,7 +27,6 @@ classifiers = [ + 'Topic :: System :: Distributed Computing', + 'Topic :: Software Development :: Libraries :: Python Modules', + ] +-include = ['CHANGELOG.md'] + + [tool.poetry.plugins] # Optional super table |