delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/19/08:48:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 19 Apr 2005 08:48:16 -0400
From: Jason Tishler <jason AT tishler DOT net>
To: cygwin AT cygwin DOT com, ward AT mit DOT edu
Subject: Re: Symlinks don't work in python???
Message-ID: <20050419124816.GB2772@tishler.net>
Mail-Followup-To: cygwin AT cygwin DOT com, ward AT mit DOT edu
References: <20050411142112 DOT GA3796 AT tishler DOT net> <E1DMWth-0006CJ-J0 AT cag DOT csail DOT mit DOT edu> <20050416021255 DOT GA2624 AT tishler DOT net>
Mime-Version: 1.0
In-Reply-To: <20050416021255.GA2624@tishler.net>
User-Agent: Mutt/1.4.1i
X-IsSubscribed: yes

Steve,

On Fri, Apr 15, 2005 at 10:12:56PM -0400, Jason Tishler wrote:
> On Fri, Apr 15, 2005 at 03:54:37PM -0400, Steve Ward wrote:
> > Can you try my failing experiment (symlink bar.py to file foo.py in
> > same directory)?
> 
> I was able reproduce your problem on my way out of work today.
> 
> > It seems using a different name for the symlink may cause the
> > trouble... I have no idea why.
> 
> Can you strace the issue and report back to the list?  If not, then I
> will try when I'm back at work on Monday.

AFAICT, symlinking bar.py to foo.py never worked or at least since
case-insensitive file system support was added to Python in 2/2001:

    http://www.amk.ca/python/2.1/index.html#SECTION0001000000000000000000

The problem is Cygwin specific code is invoked during imports to make
sure one imports a module using the same case as the file stored in the
file system.  For example, "foo" will match "foo.py" but not "FoO.py",
etc.  When you import bar (i.e., bar.py) which is symlinked to foo.py
the case checking code fails (because "bar" != "foo") and the module is
skipped.

You can workaround the problem by defining PYTHONCASEOK:

    $ PYTHONCASEOK= python -c 'import bar'
    $

I will work with the Python developers to try to come up with a better
long term solution.

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019