From b2902cf903cde636eeadb882945cdabc6d61d434 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 12 Feb 2024 15:41:37 -0500 Subject: [PATCH] python311Packages.editorconfig: 0.12.3 -> 0.12.4 Diff: https://github.com/editorconfig/editorconfig-core-py/compare/v0.12.3...v0.12.4 --- .../python-modules/editorconfig/default.nix | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/editorconfig/default.nix b/pkgs/development/python-modules/editorconfig/default.nix index eaca75178474..f55442b2f584 100644 --- a/pkgs/development/python-modules/editorconfig/default.nix +++ b/pkgs/development/python-modules/editorconfig/default.nix @@ -1,35 +1,26 @@ { lib , buildPythonPackage , fetchFromGitHub +, setuptools , cmake }: -let - tests = fetchFromGitHub { - owner = "editorconfig"; - repo = "editorconfig-core-test"; - rev = "e407c1592df0f8e91664835324dea85146f20189"; - hash = "sha256-9WSEkMJOewPqJjB6f7J6Ir0L+U712hkaN+GszjnGw7c="; - }; -in buildPythonPackage rec { pname = "editorconfig"; - version = "0.12.3"; - format = "setuptools"; + version = "0.12.4"; + pyproject = true; src = fetchFromGitHub { owner = "editorconfig"; repo = "editorconfig-core-py"; rev = "v${version}"; - hash = "sha256-ZwoTMgk18+BpPNtXKQUMXGcl2Lp+1RQVyPHgk6gHWh8="; - # workaround until https://github.com/editorconfig/editorconfig-core-py/pull/40 is merged - # fetchSubmodules = true; + hash = "sha256-+m674bLj6xs7MWU+8BMixEwy7/TjyES0lvCLLogTDHQ="; + fetchSubmodules = true; }; - postUnpack = '' - cp -r ${tests}/* source/tests - chmod +w -R source/tests - ''; + nativeBuildInputs = [ + setuptools + ]; nativeCheckInputs = [ cmake @@ -38,9 +29,12 @@ buildPythonPackage rec { dontUseCmakeConfigure = true; checkPhase = '' + runHook preCheck + cmake . - # utf_8_char fails with Python 3 - ctest -E "utf_8_char" . + ctest . + + runHook postCheck ''; pythonImportsCheck = [ "editorconfig" ];