You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because PrettyPrintTree doesn't have a pre-built package for Apple Silicon. A temporary fix is to install it directly from the repo:
python -m pip install -U "git+https://github.com/AharonSambol/PrettyPrintTree.git"
However, I don't think we need to keep it in the dependencies; maybe we should remove this module entirely.
Hi @kelvinopoku777 , if you just try to set it up after commenting out this particular import, everything should work fine. Also, I agree with @AL-255 , if it works without the import, maybe it is better to remove the import altogether.
Hi, I audited this against current main and the installation failure still appears actionable.
src/glayout/util/port_utils.py already treats both PrettyPrint and prettyprinttree as optional by falling back when neither can be imported. However, setup.py still lists both prettyprint and prettyprinttree in install_requires, so pip install . must install them before that fallback can ever help. Also, prettyprint itself is not imported anywhere; only PrettyPrintTree is used, by PortTree.print().
I would like to work on a focused fix if this is still available. My proposed scope is:
remove the unused hard dependency on prettyprint;
stop making the optional tree renderer block the base installation (either move prettyprinttree to an optional extra or replace the small rendering use, according to your preference);
preserve the existing PortTree API and make absence of an optional renderer explicit rather than silently producing an empty file;
add regression coverage for importing/using the base package without the third-party pretty-print modules;
avoid unrelated dependency or packaging changes.
Would you prefer prettyprinttree as an optional extra, or a small dependency-free tree rendering implementation so PortTree.print() keeps working in the base install?
I used OpenAI Codex interactively for repository navigation and this current-main audit. I will personally review, test, and understand every change, remain responsible for the contribution, and disclose the assistance in the PR.
One current-data update after checking both PyPI artifacts and a clean Python 3.11 install:
prettyprinttree 2.0.2 (released 2026-08-18) now has a universal py3-none-any wheel, so the original Apple Silicon wheel blocker may have changed.
The current dependency set still has a reproducible problem. On a case-insensitive Windows filesystem, installing both prettyprint 0.1.5 and prettyprinttree 2.0.2 causes their prettyprint/ and PrettyPrint/ package trees to collide. Both imports attempted by port_utils.py then fail, and gLayout silently selects its no-op fallback; PortTree.print(savetofile=True) produces no file.
Removing the unused prettyprint package alone exposes a second incompatibility: PrettyPrintTree 2.0.2 rejects the existing default_orientation argument with TypeError.
PrettyPrintTree 1.36.4 already provides a universal py3-none-any wheel and is compatible with the current PortTree.print() call. With only prettyprinttree>=1.36.4,<2, the same regression test writes and reads the expected hierarchy successfully.
I opened draft PR #118 with the smallest compatibility-preserving candidate: remove the unused prettyprint dependency, constrain the actual renderer to prettyprinttree>=1.36.4,<2, install it in the lightweight unit-test job, and add one PortTree.print() regression test. The test fails with the dependencies resolved by current setup.py and passes with that candidate. The PR remains a draft while awaiting maintainer direction here.
Activity
AL-255 commentedon Mar 13, 2026
This is because PrettyPrintTree doesn't have a pre-built package for Apple Silicon. A temporary fix is to install it directly from the repo:
python -m pip install -U "git+https://github.com/AharonSambol/PrettyPrintTree.git"
However, I don't think we need to keep it in the dependencies; maybe we should remove this module entirely.
adityakak27 commentedon Mar 22, 2026
Hi @kelvinopoku777 , if you just try to set it up after commenting out this particular import, everything should work fine. Also, I agree with @AL-255 , if it works without the import, maybe it is better to remove the import altogether.
appleweiping commentedon Aug 30, 2026
Hi, I audited this against current main and the installation failure still appears actionable.
src/glayout/util/port_utils.py already treats both PrettyPrint and prettyprinttree as optional by falling back when neither can be imported. However, setup.py still lists both prettyprint and prettyprinttree in install_requires, so pip install . must install them before that fallback can ever help. Also, prettyprint itself is not imported anywhere; only PrettyPrintTree is used, by PortTree.print().
I would like to work on a focused fix if this is still available. My proposed scope is:
Would you prefer prettyprinttree as an optional extra, or a small dependency-free tree rendering implementation so PortTree.print() keeps working in the base install?
I used OpenAI Codex interactively for repository navigation and this current-main audit. I will personally review, test, and understand every change, remain responsible for the contribution, and disclose the assistance in the PR.
appleweiping commentedon Aug 30, 2026
One current-data update after checking both PyPI artifacts and a clean Python 3.11 install:
prettyprinttree 2.0.2(released 2026-08-18) now has a universalpy3-none-anywheel, so the original Apple Silicon wheel blocker may have changed.prettyprint 0.1.5andprettyprinttree 2.0.2causes theirprettyprint/andPrettyPrint/package trees to collide. Both imports attempted byport_utils.pythen fail, and gLayout silently selects its no-op fallback;PortTree.print(savetofile=True)produces no file.prettyprintpackage alone exposes a second incompatibility:PrettyPrintTree 2.0.2rejects the existingdefault_orientationargument withTypeError.PrettyPrintTree 1.36.4already provides a universalpy3-none-anywheel and is compatible with the currentPortTree.print()call. With onlyprettyprinttree>=1.36.4,<2, the same regression test writes and reads the expected hierarchy successfully.I opened draft PR #118 with the smallest compatibility-preserving candidate: remove the unused
prettyprintdependency, constrain the actual renderer toprettyprinttree>=1.36.4,<2, install it in the lightweight unit-test job, and add onePortTree.print()regression test. The test fails with the dependencies resolved by currentsetup.pyand passes with that candidate. The PR remains a draft while awaiting maintainer direction here.