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
Missing symlink:Current after Mac OS X 3.3.2 package installation #62317
Comments
There is a missing symlink. Context: Found the following in /Library/Frameworks/Python.framework: However: Specifically we are missing the following from .../Versions: to make all the other symlinks work as intended. This also implies the ~/.bash_profile patch would be improved if the existing: Apologies if this has already been reported. It is my first report so I could easily have missed something: I searched with terms "installer mac". Regards |
That behavior of the OS X installer is by design. Currently, the "Current" link is only set for Python 2 installations, not Python 3 ones. While that may have made sense in the early days of Python 3 (assuming there would be mixed installations of both Python 3 and Python 2 to the same framework), that is probably no longer a good idea. Considering the difference between Python 2 and 3 at the API level and that one of the reasons for installing as a framework should be to simplify linking with Python libraries, I've been thinking that it might be a good idea to have Python 3 install in its own framework, say Python3. Or some other arrangement. As it stands today, 'cc ... -framework Python ...' isn't usable for Python 3 out of the box. |
Appreciate the comment about potential problems with mixed installations of python3 and python2. And note that along these lines there is no attempt by the installer to symlink python -> python3 (which could have nasty side effects if the full path was not specified in system applications). However there is still a problem: the installer is creating three dead symlinks, which is not correct. Agree putting Python3 into its own /Library/Frameworks/Python3.framework would be a better way to go. |
Linking with "-framework Python" is always a bad idea because you have no control over which version of Python you link with other than by changing global system state (the Current link). Also: include files aren't included using the framework conventions (e.g. we use "#include <Python.h>", not "#include <Python/Python.h>"). I'd prefer to remove the Current link from "from source" installs instead adding them to the py3k installer, that makes is clearer that you are not supposed to use "-framework Python". I'm also not too keen on renaming the Python framework for Python 3.4. |
A lot of this is past my level but speaking from my level I just want packages to be consistent, i.e., if there is a symlink it should point to something (preferably useful) not dangle as is the case now. Also I want an installed version to "look the same" no matter what version it might be. Specifically the version number should only occur once in the file tree. This then allows me to specify ***at the system level*** what I want when invoking (via a Current or similar link) my postgres and other build scripts, specifically so they don't need to be hand crafted just so they build against new new and latest install. If I ever get to the stage where I am building to a specific version that's not the global selection I can do that by taking proper steps (but that's not what I usually want to do after installing a new version). Continuing in the vein of one only mention of the version number in the package tree: why is there a python3.3 folder inside .../Pyton.framework/Versions/3.3/lib? Won't lib/Python3.4 stuff get put in its own Version? As for the reluctance to rename the package for 3.4. Wont it be Python3 and the rename could just as logically be done for the current release: Finally there seems to be a convention with all the other installed packages for a "Current" symlink (note especially Tcl/Tk) to do something useful within their respective "Versions" folder. Is it too much to suggest that Python just follow this convention (albeit with the package name changed to pyton3 to prevent potential conflicts)? Anyway, please excuse my drifting so far from a simple report of a broken and/or missing installer link :) Regards |
There is a python3.3 in .../Python.framework/Versions/3.3/lib because .../Python.framework/Versions/3.3 is basicly a regular unix install with some trivial changes (in particular, there is a Python shared library in the root of the tree, there is a Python.app and bin/python isn't the real interpreter but a stub). Keeping the framework close to a regular unix install is an explicit design choice, it minimizes the difference from those unix installs and reduces the amount of needless incompatibilities (for example with scripts that run on unix-like systems and assume a particular layout of sys.prefix) I try to avoid relying on the Current symlink because it depends on the order in which packages are installed, for example when you have two version of Python installed and update one of them the Current link may change even if you might not want to. Futhermore the Current link can only be changed by users with elevated privileges (an "admin" account or root). Again, I don't think renaming the framework for Python 3 would be useful and even if it were done it could only be done for Python 3.4 al existing releases of Py3k would still use Python.framework because changing the framework name will break existing installations when installing an update with a changed framework name. |
Ned, can this issue be closed or is there still something to discuss here? |
David, I think we are not going to change the Current symlink behavior at this point so we might as well close this issue. We may decide to address the need to pick which version to link with in a different manner later. |
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: