python3Packages.kinparse: unstable-2019-12-18 -> 1.2.3

Changed files
+28 -16
pkgs
development
python-modules
kinparse
+28 -16
pkgs/development/python-modules/kinparse/default.nix
···
lib,
buildPythonPackage,
fetchFromGitHub,
-
pytest,
-
future,
pyparsing,
+
pytestCheckHook,
+
setuptools,
}:
-
buildPythonPackage {
+
buildPythonPackage rec {
pname = "kinparse";
-
version = "unstable-2019-12-18";
-
format = "setuptools";
+
version = "1.2.3";
+
pyproject = true;
src = fetchFromGitHub {
owner = "xesscorp";
repo = "kinparse";
-
rev = "eeb3f346d57a67a471bdf111f39bef8932644481";
-
sha256 = "1nrjnybwzy93c79yylcwmb4lvkx7hixavnjwffslz0zwn32l0kx3";
+
tag = version;
+
hash = "sha256-170e2uhqpk6u/hahivWYubr3Ptb8ijymJSxhxrAfuyI=";
};
-
pythonImportsCheck = [ "kinparse" ];
+
# Remove python2 build support as it breaks python >= 3.13
+
postPatch = ''
+
substituteInPlace setup.cfg \
+
--replace-fail "universal = 1" "universal = 0"
+
'';
-
nativeCheckInputs = [ pytest ];
+
build-system = [ setuptools ];
-
propagatedBuildInputs = [
-
future
-
pyparsing
-
];
+
dependencies = [ pyparsing ];
+
+
pythonRemoveDeps = [ "future" ];
-
meta = with lib; {
+
preCheck = ''
+
substituteInPlace tests/test_kinparse.py \
+
--replace-fail "data/" "$src/tests/data/"
+
'';
+
+
nativeCheckInputs = [ pytestCheckHook ];
+
+
pythonImportsCheck = [ "kinparse" ];
+
+
meta = {
description = "Parser for KiCad EESCHEMA netlists";
mainProgram = "kinparse";
homepage = "https://github.com/xesscorp/kinparse";
-
license = licenses.mit;
-
maintainers = with maintainers; [ matthuszagh ];
+
license = lib.licenses.mit;
+
maintainers = with lib.maintainers; [ matthuszagh ];
};
}