New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20285 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

python_select does not function on 10.6

Reported by: snc@… Owned by: raimue@…
Priority: Low Milestone:
Component: ports Version: 1.8.0
Keywords: snowleopard Cc: info@…, benjaminkreeger@…, brianm@…, kiwi.2008@…, faisal.moledina@…, mmoll@…, macosforge@…, ram@…, 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

follow-up: ↓ 2   Changed 3 years ago by snc@…

It seems these are because /opt/local/Library does not exist.

in reply to: ↑ 1 ; follow-up: ↓ 3   Changed 3 years ago by raimue@…

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.

in reply to: ↑ 2 ; follow-up: ↓ 5   Changed 3 years ago by snc@…

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"
        }
    }
}

  Changed 3 years ago by info@…

  • cc info@… added

Cc Me!

in reply to: ↑ 3   Changed 3 years ago by raimue@…

  • status changed from new to 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.

  Changed 3 years ago by snc@…

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
-
-
-
-

  Changed 3 years ago by snc@…

Committed the python26-apple and included it in python_select: r53964. I have not yet changed the revision.

  Changed 3 years ago by snc@…

  • keywords snowleopard added

  Changed 2 years ago by benjaminkreeger@…

  • cc benjaminkreeger@… added

Cc Me!

  Changed 2 years ago by brianm@…

  • cc brianm@… added

Cc Me!

  Changed 2 years ago by nate@…

Any update on this from anyone?

  Changed 2 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.

  Changed 2 years ago by ram@…

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 ~]$

  Changed 2 years ago by kiwi.2008@…

  • cc kiwi.2008@… added

Cc Me!

  Changed 2 years ago by faisal.moledina@…

  • cc faisal.moledina@… added

Cc Me!

  Changed 2 years ago by mmoll@…

  • cc mmoll@… added

Cc Me!

  Changed 2 years ago by mmoll@…

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).

  Changed 2 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.

  Changed 2 years ago by snc@…

python_select seems to be working just fine for me with python25 and python26.

follow-up: ↓ 21   Changed 2 years ago by 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


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


in reply to: ↑ 20   Changed 2 years ago by raimue@…

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.

  Changed 2 years ago by macosforge@…

  • cc macosforge@… added

Cc Me!

follow-up: ↓ 25   Changed 2 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"!

  Changed 2 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.

in reply to: ↑ 23   Changed 2 years ago by null.atou@…

Replying to dackze+macports@…:

ln: /opt/local//opt/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

  Changed 2 years ago by ram@…

  • cc ram@… added

Cc Me!

  Changed 2 years ago by jmr@…

  • status changed from assigned to closed
  • resolution set to fixed

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.

follow-up: ↓ 30   Changed 2 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.

  Changed 2 years ago by cjerdonek@…

  • cc cjerdonek@… added

Cc Me!

in reply to: ↑ 28   Changed 2 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!

Note: See TracTickets for help on using tickets.