Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#21268 closed defect (fixed)

Python_select fails for a non-standard framework path

Reported by: Veence (Vincent) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc:
Port: python_select

Description

My framework path (chosen when configuring macports) is ${PREFIX}/frameworks (and not ${PREFIX}/Library/Frameworks).

When I reinstalled python26, I tried to use python_select, but it ended up like this:

Selecting version "python26" for python
ln: /usr/pkg/Library/Frameworks/Python.framework/Versions/Current: No such file or directory
ln: /usr/pkg/Library/Frameworks/Python.framework/Headers: No such file or directory
ln: /usr/pkg/Library/Frameworks/Python.framework/Resources: No such file or directory
ln: /usr/pkg/Library/Frameworks/Python.framework/Python: No such file or directory
there were 4 errors selecting version "python26"!

It turns out that ${CONFPATH}/base contains a wrong path:

-> cat /usr/pkg/etc/select/python/base 
bin/python
bin/pythonw
bin/python-config
bin/idle
bin/pydoc
bin/smtpd.py
share/man/man1/python.1
share/man/man1/python.1.gz
Library/Frameworks/Python.framework/Versions/Current
Library/Frameworks/Python.framework/Headers
Library/Frameworks/Python.framework/Resources
Library/Frameworks/Python.framework/Python


whereas ${CONFPATH}/python26 is correct:

-> cat /usr/pkg/etc/select/python/python26
bin/python2.6
bin/pythonw2.6
bin/python2.6-config
bin/idle2.6
bin/pydoc2.6
bin/smtpd2.6.py
share/man/man1/python2.6.1
-
/usr/pkg/frameworks/Python.framework/Versions/2.6
/usr/pkg/frameworks/Python.framework/Versions/2.6/Headers
/usr/pkg/frameworks/Python.framework/Versions/2.6/Resources
/usr/pkg/frameworks/Python.framework/Versions/2.6/Python

so why is the base file incorrect?

Attachments (1)

python_select.diff (1.1 KB) - added by nerdling (Jeremy Lavergne) 15 years ago.
suggestion for a fix

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by nerdling (Jeremy Lavergne)

Attachment: python_select.diff added

suggestion for a fix

comment:1 Changed 15 years ago by nerdling (Jeremy Lavergne)

The diff I attached attempts to reinplace the value in base.

It first inserts the @@FRAMEWORKS_PATH@@ and then trying to figure out the path to use by removing ${prefix} from ${frameworks_dir}.

comment:2 Changed 15 years ago by nerdling (Jeremy Lavergne)

Owner: changed from macports-tickets@… to raimue@…

comment:3 Changed 15 years ago by raimue (Rainer Müller)

Status: newassigned

comment:4 Changed 15 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: assignedclosed

Fixed by r57391 and r57392.

comment:5 Changed 15 years ago by Veence (Vincent)

When I retry, I get this error:

-> sudo port install python_select
--->  Computing dependencies for python_select
--->  Fetching python_select
--->  Verifying checksum(s) for python_select
--->  Extracting python_select
--->  Configuring python_select
--->  Building python_select
--->  Staging python_select into destroot
Error: Target org.macports.destroot returned: invalid command name "select::install"
Error: Status 1 encountered during processing.

Have I missed a step?

comment:6 Changed 15 years ago by Veence (Vincent)

Okay, my apologies. It works fine, thanks.

Note: See TracTickets for help on using tickets.