Unverified Commit 6624d755 authored by Marcin Serwin's avatar Marcin Serwin Committed by GitHub
Browse files

python3Packages.csvw: 1.11.0 -> 3.7.0 (#482851)

parents 00ad0f8e 93d1d04a
Loading
Loading
Loading
Loading
+38 −11
Original line number Diff line number Diff line
@@ -3,49 +3,76 @@
  buildPythonPackage,
  fetchFromGitHub,
  attrs,
  babel,
  frictionless,
  isodate,
  jsonschema,
  language-tags,
  python-dateutil,
  rdflib,
  requests,
  rfc3986,
  setuptools,
  termcolor,
  uritemplate,
  pytestCheckHook,
  pytest-cov-stub,
  pytest-mock,
  requests-mock,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "csvw";
  version = "1.11.0";
  format = "setuptools";
  version = "3.7.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "cldf";
    repo = "csvw";
    rev = "v${version}";
    sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg";
    tag = "v${finalAttrs.version}";
    hash = "sha256-HftvI4xJy/MX0WTIFNyZqNqIJIlHsWhhURpeQ1XqrT0=";
  };

  propagatedBuildInputs = [
  postPatch = ''
    substituteInPlace src/csvw/__main__.py \
      --replace-fail "'frictionless'" "'${lib.getExe frictionless}'"
  '';

  build-system = [ setuptools ];

  dependencies = [
    attrs
    babel
    frictionless
    isodate
    jsonschema
    python-dateutil
    requests
    rdflib
    rfc3986
    uritemplate
    termcolor
    language-tags
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
    pytest-mock
    requests-mock
  ];

  pythonRelaxDeps = [ "rfc3986" ];

  disabledTests = [
    # this test is flaky on darwin because it depends on the resolution of filesystem mtimes
    # https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257
    "test_write_file_exists"
    # https://github.com/cldf/csvw/issues/58
    "test_roundtrip_escapechar"
    "test_escapequote_escapecharquotechar_final"
    "test_doubleQuote"
  ];

  disabledTestPaths = [
    # Missing manifest-json.jsonld
    "tests/test_conformance.py"
  ];

  pythonImportsCheck = [ "csvw" ];
@@ -56,4 +83,4 @@ buildPythonPackage rec {
    license = lib.licenses.asl20;
    maintainers = [ ];
  };
}
})
+1 −0
Original line number Diff line number Diff line
@@ -225,5 +225,6 @@ buildPythonPackage rec {
    changelog = "https://github.com/frictionlessdata/frictionless-py/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ zhaofengli ];
    mainProgram = "frictionless";
  };
}