Merge pull request #185669 from gador/paperless-ngx-1.8.0

paperless-ngx: update to 1.8.0, python3Packages.django-q: add gador as maintainer, switch to GitHub
This commit is contained in:
Robert Scott 2022-08-11 00:22:35 +01:00 committed by GitHub
commit 4844604b38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 121 additions and 9 deletions

View File

@ -11,6 +11,7 @@
, tesseract4
, unpaper
, liberation_ttf
, fetchFromGitHub
}:
let
@ -19,6 +20,20 @@ let
packageOverrides = self: super: {
django = super.django_4;
# use paperless-ngx version of django-q
# see https://github.com/paperless-ngx/paperless-ngx/pull/1014
django-q = super.django-q.overridePythonAttrs (oldAttrs: rec {
src = fetchFromGitHub {
owner = "paperless-ngx";
repo = "django-q";
sha256 = "sha256-aoDuPig8Nf8fLzn7GjBn69aF2zH2l8gxascAu9lIG3U=";
rev = "71abc78fdaec029cf71e9849a3b0fa084a1678f7";
};
# due to paperless-ngx modification of the pyproject.toml file
# the patch is not needed any more
patches = [];
});
# django-extensions 3.1.5 is required, but its tests are incompatible with Django 4
django-extensions = super.django-extensions.overridePythonAttrs (_: {
doCheck = false;
@ -38,12 +53,12 @@ let
in
py.pkgs.pythonPackages.buildPythonApplication rec {
pname = "paperless-ngx";
version = "1.7.1";
version = "1.8.0";
# Fetch the release tarball instead of a git ref because it contains the prebuilt fontend
src = fetchurl {
url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/v${version}/${pname}-v${version}.tar.xz";
hash = "sha256-8vx4hvbIqaChjPyS8Q0ar2bz/pLzEdxoF7P2gBEeFzc=";
hash = "sha256-BLfhh04RvBJFRQiPXkMl8XlWqZOWKmjjl+6lZ326stU=";
};
format = "other";
@ -144,6 +159,13 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
zope_interface
];
# paperless-ngx includes the bundled django-q version. This will
# conflict with the tests and is not needed since we overrode the
# django-q version with the paperless-ngx version
postPatch = ''
rm -rf src/django-q
'';
# Compile manually because `pythonRecompileBytecodeHook` only works for
# files in `python.sitePackages`
postBuild = ''

View File

@ -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
];
doCheck = false;
# 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 = !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 ];
};
}

View File

@ -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