python310Packages.django_silk: disable on older Python releases

- pythonImportsCheck
This commit is contained in:
Fabian Affolter 2022-10-30 09:49:50 +01:00 committed by GitHub
parent d95d9632e1
commit 3244134951
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,34 +1,36 @@
{ lib { lib
, autopep8
, buildPythonPackage , buildPythonPackage
, python , contextlib2
, pythonAtLeast , django
, factory_boy
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, django , freezegun
, gprof2dot
, jinja2
, mock
, networkx
, pillow
, pydot
, pygments , pygments
, simplejson , python
, python-dateutil , python-dateutil
, pythonOlder
, pytz
, requests , requests
, setuptools-scm , setuptools-scm
, simplejson
, sqlparse , sqlparse
, jinja2
, autopep8
, pytz
, pillow
, mock
, gprof2dot
, freezegun
, contextlib2
, networkx
, pydot
, factory_boy
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "django-silk"; pname = "django-silk";
version = "5.0.2"; version = "5.0.2";
format = "setuptools";
disabled = pythonOlder "3.7";
# pypi tarball doesn't include test project
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jazzband"; owner = "jazzband";
repo = "django-silk"; repo = "django-silk";
@ -36,7 +38,7 @@ buildPythonPackage rec {
hash = "sha256-LzcbRZ9NLTkDTZ2eW+uXYqPbWDSdLZAJcYdD8JLuiDc="; hash = "sha256-LzcbRZ9NLTkDTZ2eW+uXYqPbWDSdLZAJcYdD8JLuiDc=";
}; };
# "test_time_taken" tests aren't suitable for reproducible execution, but django's # "test_time_taken" tests aren't suitable for reproducible execution, but Django's
# test runner doesn't have an easy way to ignore tests - so instead prevent it from picking # test runner doesn't have an easy way to ignore tests - so instead prevent it from picking
# them up as tests # them up as tests
postPatch = '' postPatch = ''
@ -46,14 +48,40 @@ buildPythonPackage rec {
--replace 'use_scm_version=True' 'version="${version}"' --replace 'use_scm_version=True' 'version="${version}"'
''; '';
nativeBuildInputs = [ setuptools-scm ]; nativeBuildInputs = [
buildInputs = [ mock ]; setuptools-scm
propagatedBuildInputs = [ ];
django pygments simplejson python-dateutil requests
sqlparse jinja2 autopep8 pytz pillow gprof2dot buildInputs = [
mock
];
propagatedBuildInputs = [
autopep8
django
gprof2dot
jinja2
pillow
pygments
python-dateutil
pytz
requests
simplejson
sqlparse
];
checkInputs = [
freezegun
contextlib2
networkx
pydot
factory_boy
];
pythonImportsCheck = [
"silk"
]; ];
checkInputs = [ freezegun contextlib2 networkx pydot factory_boy ];
checkPhase = '' checkPhase = ''
runHook preCheck runHook preCheck
@ -70,5 +98,4 @@ buildPythonPackage rec {
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ ris ]; maintainers = with maintainers; [ ris ];
}; };
} }