Commit 6aa0e2cf authored by Bruno Rodrigues's avatar Bruno Rodrigues
Browse files

python3Packages.phart: init at 1.1.4

parent 9bb61fdc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
{ python3Packages }:

python3Packages.toPythonApplication python3Packages.phart
+68 −0
Original line number Diff line number Diff line
{
  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 −0
Original line number Diff line number Diff line
@@ -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 { };