python3Packages.phart: init at 1.1.4

This commit is contained in:
Bruno Rodrigues
2025-10-09 11:10:35 +02:00
parent 9bb61fdc05
commit 6aa0e2cf50
3 changed files with 73 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
{ python3Packages }:
python3Packages.toPythonApplication python3Packages.phart
@@ -0,0 +1,68 @@
{
lib,
buildPythonPackage,
fetchPypi,
hatchling,
networkx,
pytestCheckHook,
pytest-cov-stub,
pydot,
}:
buildPythonPackage rec {
pname = "phart";
version = "1.1.4";
src = fetchPypi {
inherit pname version;
hash = "sha256-JpHjEVKpOPSNUdUjZxWBHt6AFCpci1nSRWhDXxG6nyw=";
};
pyproject = true;
build-system = [
hatchling
];
preCheck = ''
export PATH=$out/bin:$PATH
'';
postPatch = ''
# pythonRelaxDeps = true; didn't work
substituteInPlace pyproject.toml \
--replace-fail 'hatchling==1.26.3' 'hatchling'
# This line makes the cli tool not work, removing it fixes it
substituteInPlace src/phart/cli.py \
--replace-fail "renderer.options.use_ascii = args.ascii" ""
'';
dependencies = [
networkx
];
disabledTestPaths = [
# Many of the tests are stale
"tests/test_cli.py"
];
nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
pydot
];
pythonImportsCheck = [
"phart"
];
meta = {
description = "Python Hierarchical ASCII Representation Tool";
homepage = "https://github.com/scottvr/phart";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ b-rodrigues ];
};
}
+2
View File
@@ -11706,6 +11706,8 @@ self: super: with self; {
pgvector = callPackage ../development/python-modules/pgvector { };
phart = callPackage ../development/python-modules/phart { };
phe = callPackage ../development/python-modules/phe { };
phik = callPackage ../development/python-modules/phik { };