Paul Moore added the comment:
There's actually a bug in the pre-3.5 script beyond the "does the directory
exist" check. The code is
if hasattr(site, "USER_SITE"):
userpath = site.USER_SITE.replace(appdata, "%APPDATA%")
userscripts = os.path.join(userpath, "Scripts")
which sets userscripts as %APPDATA%\Python\Python34\site-packages\Scripts,
which is completely wrong. Stripping off 2 directory levels gives the correct
answer, but that seems a bit arbitrary - using sysconfig seems more robust.
Also, there's another point made in the original report - the registry variable
HKCU\Environment\PATH is set to "%PATH%;<the stuff we add>". That's just wrong
- the user PATH variable is added to the system PATH variable, so why
interpolate the existing value? It may be that the behaviour varies in
different Windows versions, I don't know enough about how older versions work
to comment on that.
There are enough bugs here that I suspect that very few people have ever used
the script :-( Maybe it would be better to leave the older versions alone, and
simply rewrite or remove it for 3.5 (I know Steve has ideas about providing new
path-setting scripts)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16328>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com