New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
site.py can break the location of the python library #43584
Comments
Given a sufficiently bizarre(*) set of symlinks on a posix system, The root of the problem is that site.makepath invokes os.path.abspath The simple fix is to make site.py call os.path.realpath on the path Here's a patch for site.py that fixes the problem: --- site.py Thu Jun 29 18:14:08 2006
+++ site-fixed.py Thu Jun 29 18:13:57 2006
@@ -63,7 +63,7 @@
def makepath(*paths):
- dir = os.path.abspath(os.path.join(*paths))
+ dir = os.path.abspath(os.path.realpath(os.path.join(*paths)))
return dir, os.path.normcase(dir)
def abs__file__(): *) Python is invoked as /cm/tools/bin/python. That's a symlink to |
The semantics of the functions in os cannot change. And I prefer keeping |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: