python310Packages.django-hijack: 3.2.6 -> 3.3.0
https://github.com/django-hijack/django-hijack/releases/tag/3.2.7 https://github.com/django-hijack/django-hijack/releases/tag/3.3.0
This commit is contained in:
parent
1149329a28
commit
31aa936b15
|
@ -1,28 +1,57 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
|
, fetchNpmDeps
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
|
||||||
|
# build-system
|
||||||
|
, gettext
|
||||||
|
, nodejs
|
||||||
|
, npmHooks
|
||||||
|
, setuptools-scm
|
||||||
|
|
||||||
|
# dependencies
|
||||||
, django
|
, django
|
||||||
, django_compat
|
, django_compat
|
||||||
|
|
||||||
|
# tests
|
||||||
, pytest-django
|
, pytest-django
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "django-hijack";
|
pname = "django-hijack";
|
||||||
version = "3.2.6";
|
version = "3.3.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
# the wheel comes with pre-built assets, allowing us to avoid fighting
|
src = fetchFromGitHub {
|
||||||
# with npm/webpack/gettext to build them ourselves.
|
owner = "django-hijack";
|
||||||
format = "wheel";
|
repo = "django-hijack";
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
src = fetchPypi {
|
hash = "sha256-ytQ4xxkBAC3amQbenD8RO5asrbfNAjOspWUY3c2hkig=";
|
||||||
inherit version format;
|
|
||||||
pname = "django_hijack";
|
|
||||||
dist = "py3";
|
|
||||||
python = "py3";
|
|
||||||
hash = "sha256-xFPZ03II1814+bZ5gx7GD/AxYMiLuH6awfSeXEraOHQ=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace 'cmd = ["npm", "ci"]' 'cmd = ["true"]' \
|
||||||
|
--replace 'f"{self.build_lib}/{name}.mo"' 'f"{name}.mo"'
|
||||||
|
|
||||||
|
sed -i "/addopts/d" setup.cfg
|
||||||
|
'';
|
||||||
|
|
||||||
|
npmDeps = fetchNpmDeps {
|
||||||
|
inherit src;
|
||||||
|
hash = "sha256-FLfMCn2jsLlTTsC+LRMX0dmVCCbNAr2pQUsSQRKgo6E=";
|
||||||
|
};
|
||||||
|
|
||||||
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
gettext
|
||||||
|
nodejs
|
||||||
|
npmHooks.npmConfigHook
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
django
|
django
|
||||||
django_compat
|
django_compat
|
||||||
|
@ -33,13 +62,11 @@ buildPythonPackage rec {
|
||||||
pytest-django
|
pytest-django
|
||||||
];
|
];
|
||||||
|
|
||||||
preCheck = ''
|
env.DJANGO_SETTINGS_MODULE = "hijack.tests.test_app.settings";
|
||||||
export DJANGO_SETTINGS_MODULE='hijack.tests.test_app.settings'
|
|
||||||
'';
|
|
||||||
|
|
||||||
pytestFlagsArray = [
|
pytestFlagsArray = [
|
||||||
"--pyargs"
|
"--pyargs" "hijack"
|
||||||
"hijack"
|
"-W" "ignore::DeprecationWarning"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue