fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / development / python-modules / django-import-export / default.nix
blob5cce017a0833d5b3d7c1a4418e0c8d88e8a805f5
2   lib,
3   buildPythonPackage,
4   chardet,
5   diff-match-patch,
6   django,
7   fetchFromGitHub,
8   psycopg2,
9   python,
10   pytz,
11   setuptools-scm,
12   tablib,
15 buildPythonPackage rec {
16   pname = "django-import-export";
17   version = "4.3.3";
18   pyproject = true;
20   src = fetchFromGitHub {
21     owner = "django-import-export";
22     repo = "django-import-export";
23     rev = "refs/tags/${version}";
24     hash = "sha256-1vb8a0ntp5ikWrJ3aI4KsGlraXRoFa7o+sP2sJpFbVc=";
25   };
27   pythonRelaxDeps = [ "tablib" ];
29   build-system = [ setuptools-scm ];
31   dependencies = [
32     diff-match-patch
33     django
34     tablib
35   ];
37   optional-dependencies = {
38     all = [ tablib ] ++ tablib.optional-dependencies.all;
39     cli = [ tablib ] ++ tablib.optional-dependencies.cli;
40     ods = [ tablib ] ++ tablib.optional-dependencies.ods;
41     pandas = [ tablib ] ++ tablib.optional-dependencies.pandas;
42     xls = [ tablib ] ++ tablib.optional-dependencies.xls;
43     xlsx = [ tablib ] ++ tablib.optional-dependencies.xlsx;
44     yaml = [ tablib ] ++ tablib.optional-dependencies.yaml;
45   };
47   nativeCheckInputs = [
48     chardet
49     psycopg2
50     pytz
51   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
53   checkPhase = ''
54     runHook preCheck
55     ${python.interpreter} tests/manage.py test core --settings=settings
56     runHook postCheck
57   '';
59   pythonImportsCheck = [ "import_export" ];
61   meta = with lib; {
62     description = "Django application and library for importing and exporting data with admin integration";
63     homepage = "https://github.com/django-import-export/django-import-export";
64     changelog = "https://github.com/django-import-export/django-import-export/blob/${version}/docs/changelog.rst";
65     license = licenses.bsd2;
66     maintainers = with maintainers; [ sephi ];
67   };