Merge pull request #168046 from risicle/ris-django-hijack-3.2.0
python3Packages.django-hijack: 2.1.10 -> 3.2.0
This commit is contained in:
commit
d657371599
2 changed files with 25 additions and 22 deletions
|
@ -34,5 +34,8 @@ buildPythonPackage rec {
|
|||
homepage = "https://github.com/arteria/django-hijack-admin";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ lsix ];
|
||||
# may be unmaintained, doesn't work with recent django-hijack:
|
||||
# https://github.com/django-hijack/django-hijack-admin/issues/46
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, python,
|
||||
django, django_compat, django_nose
|
||||
{ lib
|
||||
, fetchPypi
|
||||
, buildPythonPackage
|
||||
, django
|
||||
, django_compat
|
||||
, pytest-django
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "django-hijack";
|
||||
version = "2.1.10";
|
||||
version = "3.2.0";
|
||||
|
||||
# the pypi packages don't include everything required for the tests
|
||||
src = fetchFromGitHub {
|
||||
owner = "arteria";
|
||||
repo = "django-hijack";
|
||||
rev = "v${version}";
|
||||
sha256 = "01fwkjdzvw0yx2spwi7zc1yy64ndq1y72bfmk7kxnq5x803m2ak6";
|
||||
# the wheel comes with pre-built assets, allowing us to avoid fighting
|
||||
# with npm/webpack/gettext to build them ourselves.
|
||||
format = "wheel";
|
||||
src = fetchPypi {
|
||||
inherit version format;
|
||||
pname = "django_hijack";
|
||||
dist = "py3";
|
||||
python = "py3";
|
||||
sha256 = "1ixn7ppmbq1bgqahwv3z57hk80ql7sxpwl8jms7y8w5z1h91cn86";
|
||||
};
|
||||
|
||||
checkInputs = [ django_nose ];
|
||||
propagatedBuildInputs = [ django django_compat ];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
# we have to do a little bit of tinkering to convince the tests to run against the installed package, not the
|
||||
# source directory
|
||||
mkdir testbase
|
||||
pushd testbase
|
||||
mv ../runtests.py .
|
||||
${python.interpreter} runtests.py hijack
|
||||
popd
|
||||
|
||||
runHook postCheck
|
||||
checkInputs = [ pytestCheckHook pytest-django ];
|
||||
preCheck = ''
|
||||
export DJANGO_SETTINGS_MODULE='hijack.tests.test_app.settings'
|
||||
'';
|
||||
pytestFlagsArray = [ "--pyargs" "hijack" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Allows superusers to hijack (=login as) and work on behalf of another user";
|
||||
|
|
Loading…
Reference in a new issue