biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / django-import-export / default.nix
blobd2d65daa668927d62881eb9eaec2e00a65f573a1
2   lib,
3   buildPythonPackage,
4   chardet,
5   diff-match-patch,
6   django,
7   fetchFromGitHub,
8   psycopg2,
9   python,
10   pythonOlder,
11   pytz,
12   setuptools-scm,
13   tablib,
16 buildPythonPackage rec {
17   pname = "django-import-export";
18   version = "4.1.1";
19   pyproject = true;
21   disabled = pythonOlder "3.7";
23   src = fetchFromGitHub {
24     owner = "django-import-export";
25     repo = "django-import-export";
26     rev = "refs/tags/${version}";
27     hash = "sha256-kD/9cpFqjipP3onMHCfimu0ffzGQAoEspjc4IfyuZak=";
28   };
30   pythonRelaxDeps = [ "tablib" ];
32   build-system = [ setuptools-scm ];
35   dependencies = [
36     diff-match-patch
37     django
38     tablib
39   ];
41   optional-dependencies = {
42     all = [ tablib ] ++ tablib.optional-dependencies.all;
43     cli = [ tablib ] ++ tablib.optional-dependencies.cli;
44     ods = [ tablib ] ++ tablib.optional-dependencies.ods;
45     pandas = [ tablib ] ++ tablib.optional-dependencies.pandas;
46     xls = [ tablib ] ++ tablib.optional-dependencies.xls;
47     xlsx = [ tablib ] ++ tablib.optional-dependencies.xlsx;
48     yaml = [ tablib ] ++ tablib.optional-dependencies.yaml;
49   };
51   nativeCheckInputs = [
52     chardet
53     psycopg2
54     pytz
55   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
57   checkPhase = ''
58     runHook preCheck
59     ${python.interpreter} tests/manage.py test core --settings=settings
60     runHook postCheck
61   '';
63   pythonImportsCheck = [ "import_export" ];
65   meta = with lib; {
66     description = "Django application and library for importing and exporting data with admin integration";
67     homepage = "https://github.com/django-import-export/django-import-export";
68     changelog = "https://github.com/django-import-export/django-import-export/blob/${version}/docs/changelog.rst";
69     license = licenses.bsd2;
70     maintainers = with maintainers; [ sephi ];
71   };