This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Cygwin 2.1 and Python modules


Dave,

Please post to cygwin@sources.redhat.com instead of sending private
email so others can benefit too.  As an added incentive, you may get a
better response time -- those pesky holidays and vacations are always
getting in the way... :,)

On Sun, Jul 01, 2001 at 04:50:42PM -0400, David Abrahams wrote:
> We corresponded about 9 months ago when I was trying to build python modules
> with Cygwin. I've finally managed to figure most of it out, and got
> something to work. Unfortunately, it required recompiling Python with
> Cygwin.

Have you tried the pre-built Cygwin Python 2.1 that is part of the
Cygwin distribution now?

> Actually, I have no serious problem with that, but the Cygwin
> version of Python uses unix path parsing conventions, so PYTHONPATH doesn't
> work as the platform expects.

By the above, do you mean how Windows expects?  If so, what is the
issue?  Cygwin Python understands a Posix style PYTHONPATH.  Are you
trying to have Win32 and Cygwin Python use the same PYTHONPATH?

Why are you using PYTHONPATH in the first place?  Just install your
extensions in /usr/lib/python2.1/site-packages and Cygwin Python will
automatically find them.

> I'm testing the resulting python modules in a
> multi-compiler build system, and trying to deal with invoking a different
> python executable with a differently-formed PYTHONPATH is just way more than
> I'm willing to to invest.

Really?  This is exactly what we do for Java's CLASSPATH on Solaris,
Linux, and Windows (i.e., Cygwin).  A couple of strategic cygpath's,
one in the build and one in the startup script, does the trick.
Using cygpath seems to be *much* easier than trying to build a custom
Python for Windows.

> I tried to rebuild Python with -mno-cygwin,
> thinking that it might make me a MINGW version which respected Win32
> conventions, but the build failed in posixmodule.c.

The above is guaranteed to fail since Mingw does not provide the Posix
functionality that Cygwin does.

> I tried using the
> pexports utility to extract a cygwin-compatible import library from
> python20.dll, but the resulting modules crashed miserably.

The above is usually done to build straight Win32 extension modules with
Mingw or Cygwin -mno-cygwin -- not to build Cygwin extension modules.

BTW, why are you still using Python 2.0 since 2.1 was released months
ago?

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]