From ce8b030e7d25cf22f2a43d8bc485dcd8637d7301 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 23 Jan 2026 00:42:26 +0100 Subject: [PATCH 1/3] frictionless: add meta.mainProgram --- pkgs/development/python-modules/frictionless/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/frictionless/default.nix b/pkgs/development/python-modules/frictionless/default.nix index 599f8f0e8258..80013e731fd4 100644 --- a/pkgs/development/python-modules/frictionless/default.nix +++ b/pkgs/development/python-modules/frictionless/default.nix @@ -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"; }; } From b1bbfd0e6ee0f61a62b39d3104ab60c32f9a3282 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 23 Jan 2026 00:39:06 +0100 Subject: [PATCH 2/3] python3Packages.csvw: 1.11.0 -> 3.7.0 --- .../python-modules/csvw/default.nix | 36 +++++++++++++++---- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/csvw/default.nix b/pkgs/development/python-modules/csvw/default.nix index 8bccfd9f3d85..7872d1b5985e 100644 --- a/pkgs/development/python-modules/csvw/default.nix +++ b/pkgs/development/python-modules/csvw/default.nix @@ -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" ]; From 93d1d04afc921ae401875b62a33bb52ab760bb8b Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 23 Jan 2026 00:40:46 +0100 Subject: [PATCH 3/3] python3Packages.csvw: modernize --- pkgs/development/python-modules/csvw/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/csvw/default.nix b/pkgs/development/python-modules/csvw/default.nix index 7872d1b5985e..7c768d3b08e7 100644 --- a/pkgs/development/python-modules/csvw/default.nix +++ b/pkgs/development/python-modules/csvw/default.nix @@ -12,6 +12,7 @@ rdflib, requests, rfc3986, + setuptools, termcolor, uritemplate, pytestCheckHook, @@ -20,15 +21,15 @@ requests-mock, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "csvw"; version = "3.7.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "cldf"; repo = "csvw"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-HftvI4xJy/MX0WTIFNyZqNqIJIlHsWhhURpeQ1XqrT0="; }; @@ -37,7 +38,9 @@ buildPythonPackage rec { --replace-fail "'frictionless'" "'${lib.getExe frictionless}'" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ attrs babel frictionless @@ -59,6 +62,8 @@ buildPythonPackage rec { 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 @@ -78,4 +83,4 @@ buildPythonPackage rec { license = lib.licenses.asl20; maintainers = [ ]; }; -} +})