Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: Steve Ward To: cygwin AT cygwin DOT com In-reply-to: (message from Steve Ward on Wed, 06 Apr 2005 17:04:52 -0400) Subject: Re: Symlinks don't work in python??? Reply-to: ward AT mit DOT edu References: Message-Id: Date: Fri, 08 Apr 2005 13:39:23 -0400 RE: I just upgraded to cygwin 1.5.14 from 1.5.12, and python (version 2.4 in both cases) stopped being able to import thru symlinks. Test case: in a directory containing a symlink to foo.py, python import foo complains "no module named foo.py"; if I copy the file to ., it imports fine. Both worked in previous releases of cygwin. Similarly, putting symlinks in site-packages no longer works. Has some change to cygwin's handling of symlinks (since 1.5.12) caused this problem? Further exploration of the import-thru-symlink bug in Cygwin python reveals that: (1) Despite the problem with imports, most os.path utilities (exists, isfile, islink, isdir) work. (2) The one execption I've found is realpath, which fails in python 2.4 under cygwin. It returns a path to the symlink, not to the target file. (3) Thinking that the realpath bug might be a key to the python import-thru-symlinks problem, I ran a simple test on recent cygwin/python combinations, finding: Cygwin version Python version realpath Import 1.5.xx: 2.yy: Works? Works? -------------- -------------- -------- ------ 1.5.14 2.4 NO NO 1.5.13 2.3.4 YES NO 1.5.14 2.3.4 YES NO 1.5.12 2.4 NO YES Neither bug shows up under Linux. Interestingly, the realpath and symlink bugs don't correlate: realpath seems broken in Cygwin python 2.4, independently of the cygwin package version, while the import bug shows up in either python version under cygwin packages since 1.5.13. Its possible that the problems are python bugs, but they seem cygwin specific. The import bug breaks several installations I use (which configure python via symlinks in site-packages, which no longer works under cygwin); has nobody else run into this problem? I suppose its possible that the bugs are triggered by something peculiar to the environment of my machines... Any ideas? - Steve Ward -- 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/