#20285 closed defect (fixed)
python_select does not function on 10.6
Reported by: | nerdling (Jeremy Lavergne) | Owned by: | raimue (Rainer Müller) |
---|---|---|---|
Priority: | Low | Milestone: | |
Component: | ports | Version: | 1.8.0 |
Keywords: | snowleopard | Cc: | info@…, benjaminkreeger@…, brianm@…, kiwi.2008@…, faisal.moledina@…, mamoll (Mark Moll), macosforge@…, skymoo (Adam Mercer), cjerdonek@… |
Port: | python_select |
Description
python_select doesn't list the versions of python available from the system and fails to set links when assigning the version.
# python_select -s none # python_select -l Available versions: current none python25 # sudo python_select python25 Selecting version "python25" for python ln: /opt/local/Library/Frameworks/Python.framework/Versions/Current: No such file or directory ln: /opt/local/Library/Frameworks/Python.framework/Headers: No such file or directory ln: /opt/local/Library/Frameworks/Python.framework/Resources: No such file or directory ln: /opt/local/Library/Frameworks/Python.framework/Python: No such file or directory there were 4 errors selecting version "python25"!
Change History (30)
comment:1 follow-up: 2 Changed 15 years ago by nerdling (Jeremy Lavergne)
comment:2 follow-up: 3 Changed 15 years ago by raimue (Rainer Müller)
Replying to snc@…:
It seems these are because
/opt/local/Library
does not exist.
What is your frameworks_dir in macports.conf?
For the system provided python it would require an additional platform darwin 10
block in the Portfile.
comment:3 follow-up: 5 Changed 15 years ago by nerdling (Jeremy Lavergne)
Replying to raimue@…:
What is your frameworks_dir in macports.conf?
frameworks_dir /opt/local/Library/Frameworks
Is this all that is needed for the new code block?
platform darwin 10 { post-destroot { xinstall -m 644 -W ${filespath} python26-apple ${destroot}${prefix}/etc/select/python } post-activate { if {[exec ${prefix}/bin/${name} -s] == "none"} { system "${prefix}/bin/${name} python26-apple" } } }
comment:5 Changed 15 years ago by raimue (Rainer Müller)
Status: | new → assigned |
---|
Replying to snc@…:
Replying to raimue@…:
What is your frameworks_dir in macports.conf?
frameworks_dir /opt/local/Library/Frameworks
Then python25 should be installed in this path. Please check by port contents python25
if that is the case. Otherwise I cannot understand why files are missing.
Is this all that is needed for the new code block? [...]
Looks good, given that the python26-apple file contains the right paths. As I don't have access to SL myself and cannot verify, please feel free to commit this additional platform yourself.
comment:6 Changed 15 years ago by nerdling (Jeremy Lavergne)
python25
only has files in:
/opt/local/bin
/opt/local/etc
/opt/local/include
/opt/local/lib
In fact, there is no /opt/local/Library
.
The path for the python26-apple files follow those of python25-apple:
/usr/bin/python2.6 /usr/bin/pythonw2.6 /usr/bin/python2.6-config - /usr/bin/pydoc2.6 /usr/bin/smtpd2.6.py - /usr/share/man/man1/python2.6.1.gz - - - -
comment:7 Changed 15 years ago by nerdling (Jeremy Lavergne)
Committed the python26-apple and included it in python_select: r53964. I have not yet changed the revision.
comment:8 Changed 15 years ago by nerdling (Jeremy Lavergne)
Keywords: | snowleopard added |
---|
comment:12 Changed 15 years ago by dmitrykichenko@…
Ditto. I am running Leopard off an external drive at the moment but I'd really prefer to be under Snow Leopard full time.
comment:13 Changed 15 years ago by skymoo (Adam Mercer)
The current version is working fine for me under SL
[ram@cizin ~]$ port installed python_select The following ports are currently installed: python_select @0.2.1_0+darwin_10 (active) [ram@cizin ~]$ uname -a Darwin cizin.local 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386 i386 [ram@cizin ~]$ python_select -s python26-apple [ram@cizin ~]$ python_select -l Available versions: current none python25 python26-apple [ram@cizin ~]$
comment:17 Changed 15 years ago by mamoll (Mark Moll)
python25 and python26 have different maintainers and a very different set of patches and Portfiles. Is it possible that python26 maintainers have figured out how to build the python Framework on Snow Leopard and the python25 maintainer hasn't? The python25 port disables the Framework build on darwin 10 (snow leopard).
comment:18 Changed 15 years ago by blb@…
Note that 2.5 on 10.6 most likely won't see frameworks, unless someone wants to port the patches to 2.5; see the python bug.
comment:19 Changed 15 years ago by nerdling (Jeremy Lavergne)
python_select seems to be working just fine for me with python25 and python26.
comment:20 follow-up: 21 Changed 15 years ago by mamoll (Mark Moll)
The contents of ${prefix}/etc/select/python/python25 is (partially) wrong, since there is no Framework. The header files are in /opt/local/include/python2.5 and the library is in /opt/local/lib/python2.5/config/libpython2.5.a
bin/python2.5 bin/pythonw2.5 bin/python2.5-config bin/idle2.5 bin/pydoc2.5 bin/smtpd2.5.py - share/man/man1/python2.5.1.gz /opt/local/Library/Frameworks/Python.framework/Versions/2.5 /opt/local/Library/Frameworks/Python.framework/Versions/2.5/Headers /opt/local/Library/Frameworks/Python.framework/Versions/2.5/Resources /opt/local/Library/Frameworks/Python.framework/Versions/2.5/Python
comment:21 Changed 15 years ago by raimue (Rainer Müller)
Replying to mmoll@…:
The contents of ${prefix}/etc/select/python/python25 is (partially) wrong, since there is no Framework. The header files are in /opt/local/include/python2.5 and the library is in /opt/local/lib/python2.5/config/libpython2.5.a
Yes, I don't expect the python25 framework build to get fixed on Snow Leopard. I could add a select file which does not contain the framework paths, but what you are seeing are warnings only.
comment:23 follow-up: 25 Changed 15 years ago by dackze+macports@…
This is what I get after installing python26 @2.6.2_4+darwin and trying to python_select it:
Selecting version "python26" for python ln: /opt/local//opt/local/Library/Frameworks/Python.framework/Versions/Current: No such file or directory ln: /opt/local//opt/local/Library/Frameworks/Python.framework/Headers: No such file or directory ln: /opt/local//opt/local/Library/Frameworks/Python.framework/Resources: No such file or directory ln: /opt/local//opt/local/Library/Frameworks/Python.framework/Python: No such file or directory there were 4 errors selecting version "python26"!
comment:24 Changed 15 years ago by macosforge@…
A "cd /opt/local && sudo ln -s /opt" got me to the point where I could use python_select against python26. It's a hack, but it'll get you up and going if you're in a bind.
comment:25 Changed 15 years ago by null.atou@…
Replying to dackze+macports@…:
ln: /opt/localopt/local/Library/Frameworks/Python.framework/Versions/Current: No such file or directory
duplicate strings "/opt/local/" in a file '/opt/local/etc/select/python/base', LL9-12. so delete "/opt/local/" strings. Here is a hack.
--- base.org 2009-09-12 02:33:43.000000000 +0900 +++ base 2009-09-12 02:34:33.000000000 +0900 @@ -6,7 +6,7 @@ bin/smtpd.py share/man/man1/python.1 share/man/man1/python.1.gz -/opt/local/Library/Frameworks/Python.framework/Versions/Current -/opt/local/Library/Frameworks/Python.framework/Headers -/opt/local/Library/Frameworks/Python.framework/Resources -/opt/local/Library/Frameworks/Python.framework/Python +Library/Frameworks/Python.framework/Versions/Current +Library/Frameworks/Python.framework/Headers +Library/Frameworks/Python.framework/Resources +Library/Frameworks/Python.framework/Python
comment:27 Changed 15 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The problem in this ticket's description is fixed (python25 is a framework build on 10.6 now), as is selecting the system python on 10.6. There is a separate issue covered by #21320.
comment:28 follow-up: 30 Changed 15 years ago by cjerdonek@…
It looks like you guys fixed this, but I am getting this error for python24 after uninstalling/installing python_select today:
sudo python_select python24 Selecting version "python24" for python ln: /opt/local/Library/Frameworks/Python.framework/Versions/Current: No such file or directory ln: /opt/local/Library/Frameworks/Python.framework/Headers: No such file or directory ln: /opt/local/Library/Frameworks/Python.framework/Resources: No such file or directory ln: /opt/local/Library/Frameworks/Python.framework/Python: No such file or directory there were 4 errors selecting version "python24"!
Has the fix not made it into the version of python_select used in "port install", or does the fix not work with python24? Thanks.
comment:30 Changed 15 years ago by cjerdonek@…
Replying to cjerdonek@…:
Has the fix not made it into the version of python_select used in "port install", or does the fix not work with python24? Thanks.
Never mind. It seems to be working for me now with python24 after installing and trying with python26. Thanks!
It seems these are because
/opt/local/Library
does not exist.