lmstudio-ai / venvstacks

Virtual environment stacks for Python
http://venvstacks.lmstudio.ai/
MIT License
171 stars 5 forks source link

Improve postinstall script resilience #69

Closed ncoghlan closed 2 weeks ago

ncoghlan commented 2 weeks ago

Closes #66. Implements initial steps towards #19.

ncoghlan commented 2 weeks ago

Need to avoid dependency on walk_up parameter to relative_to for Python 3.11:

src/venvstacks/stacks.py:1060: error: Unexpected keyword argument "walk_up" for "relative_to" of "PurePath" [call-arg]

ncoghlan commented 2 weeks ago

Latest Windows failures are due to the fake "absolute" paths in the postinstall tests lacking a drive letter, so they're not considered absolute on Windows.

I also worked out some new checks to add to the check_deployed_environment helper methods in the test suite that would have helped catch these problems earlier:

ncoghlan commented 2 weeks ago

Even with the new build and deployed environment sys.path checks passing, there appears to still be a problem with the layered environments not correctly picking up the items that are already installed in the lower layers.

ncoghlan commented 2 weeks ago

There are some relative paths that are not being correctly resolved (they're being resolved relative to the environment path rather than the base build path)