This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Python extension package problem & root-cause
- From: Jason Tishler <jason at tishler dot net>
- To: cygwin at cygwin dot com
- Date: Fri, 16 Sep 2005 07:56:34 -0400
- Subject: Re: Python extension package problem & root-cause
- References: <1FA0F815-D70C-47E4-AEC0-AF21AC773F99@acm.org>
John,
On Thu, Sep 15, 2005 at 10:54:32PM -0700, John Whitley wrote:
> The test "string.find(...) != -1" attempts to test whether "/usr"
> appears in the full executable name. This incorrectly fails in the
> case that /bin is in the user's path before /usr/bin
> (i.e. string.find("/bin/python","/usr") == -1). Note that a vagary of
> Cygwin is that /usr/bin is a Cygwin mount to /bin.
Thank you very much for the detailed analysis!
> Workaround:
>
> The workaround is to ensure that /usr/bin appears in your path before
> /bin. It looks like a new and improved Cygwin special case test is
> needed to fix this problem; I'm not sure offhand what the best case
> would be. Perhaps an outright test as follows would work:
> sys.executable.startswith(sys.exec_prefix) or
> sys.executable.startswith(os.sep+"bin")
Unfortunately, I'm not sure what is the best way to solve this problem.
I will try to get a discussion going on SF...
Thanks,
Jason
--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/