Commit b1bbfd0e authored by Sigmanificient's avatar Sigmanificient
Browse files

python3Packages.csvw: 1.11.0 -> 3.7.0

parent ce8b030e
Loading
Loading
Loading
Loading
+29 −7
Original line number Diff line number Diff line
@@ -3,49 +3,71 @@
  buildPythonPackage,
  fetchFromGitHub,
  attrs,
  babel,
  frictionless,
  isodate,
  jsonschema,
  language-tags,
  python-dateutil,
  rdflib,
  requests,
  rfc3986,
  termcolor,
  uritemplate,
  pytestCheckHook,
  pytest-cov-stub,
  pytest-mock,
  requests-mock,
}:

buildPythonPackage rec {
  pname = "csvw";
  version = "1.11.0";
  version = "3.7.0";
  format = "setuptools";

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

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

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

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

  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" ];