Unverified Commit 75df1829 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #312650 from fabaff/django-import-export-bump

python311Packages.django-import-export: 3.3.8 -> 4.0.3 
parents 23fbf162 12ba07f7
Loading
Loading
Loading
Loading
+38 −21
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, chardet
, diff-match-patch
, django
, fetchFromGitHub
, psycopg2
, python
, pythonOlder
, pytz
, tablib
{
  lib,
  buildPythonPackage,
  chardet,
  diff-match-patch,
  django,
  fetchFromGitHub,
  psycopg2,
  python,
  pythonOlder,
  pythonRelaxDepsHook,
  pytz,
  setuptools-scm,
  tablib,
}:

buildPythonPackage rec {
  pname = "django-import-export";
  version = "3.3.8";
  format = "setuptools";
  version = "4.0.3";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "django-import-export";
    repo = pname;
    repo = "django-import-export";
    rev = "refs/tags/${version}";
    hash = "sha256-9BsaYLAkd6UvQxMtwk+pI7HyOWNU4rUmingkyemRCz4=";
    hash = "sha256-ItJx9yJSy88/OvkpjGDWGBOMk5YlSquicSWi0tbKeWE=";
  };

  propagatedBuildInputs = [
  pythonRelaxDeps = [ "tablib" ];

  build-system = [ setuptools-scm ];

  nativeBuildInputs = [ pythonRelaxDepsHook ];

  dependencies = [
    diff-match-patch
    django
    tablib
  ] ++ (with tablib.optional-dependencies; html ++ ods ++ xls ++ xlsx ++ yaml);
  ];

  passthru.optional-dependencies = {
    all = [ tablib ] ++ tablib.optional-dependencies.all;
    cli = [ tablib ] ++ tablib.optional-dependencies.cli;
    ods = [ tablib ] ++ tablib.optional-dependencies.ods;
    pandas = [ tablib ] ++ tablib.optional-dependencies.pandas;
    xls = [ tablib ] ++ tablib.optional-dependencies.xls;
    xlsx = [ tablib ] ++ tablib.optional-dependencies.xlsx;
    yaml = [ tablib ] ++ tablib.optional-dependencies.yaml;
  };

  nativeCheckInputs = [
    chardet
    psycopg2
    pytz
  ];
  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

  checkPhase = ''
    runHook preCheck
@@ -43,9 +62,7 @@ buildPythonPackage rec {
    runHook postCheck
  '';

  pythonImportsCheck = [
    "import_export"
  ];
  pythonImportsCheck = [ "import_export" ];

  meta = with lib; {
    description = "Django application and library for importing and exporting data with admin integration";