Open milahu opened 2 months ago
https://github.com/pleiszenburg/zugbruecke/blob/3cf84f9a27941de066e90944f5160c4fe77e4936/src/zugbruecke/core/wenv.py#L120-L121
fix:
if not os.path.exists(sitepackages): continue
edit: no, that only hides the issue, when zugbruecke is not installed to /home/user/.local/lib/python3.11/site-packages
ValueError: ('dist-info for package could not be found', 'zugbruecke')
instead, zugbruecke should use __file__ to find zugbruecke-0.2.1.dist-info wenv.__file__ to find wenv-0.5.1.dist-info etc
__file__
zugbruecke-0.2.1.dist-info
wenv.__file__
wenv-0.5.1.dist-info
def _setup_package(self, name: str, version: str): # ... if name == "zugbruecke": unix_dist_path = os.path.realpath(os.path.dirname(__file__) + "../../../" + dist_name) elif name == "wenv": import wenv unix_dist_path = os.path.realpath(os.path.dirname(wenv.__file__) + "/../" + dist_name) else: raise Exception(f"FIXME find dist path of package {name}")
A variation of this bug blobbed up before a few years ago - though I found it hard to add a proper test for it. PR highly welcome.
https://github.com/pleiszenburg/zugbruecke/blob/3cf84f9a27941de066e90944f5160c4fe77e4936/src/zugbruecke/core/wenv.py#L120-L121
fix:
edit: no, that only hides the issue, when zugbruecke is not installed to /home/user/.local/lib/python3.11/site-packages
instead, zugbruecke should use
__file__
to findzugbruecke-0.2.1.dist-info
wenv.__file__
to findwenv-0.5.1.dist-info
etc