[Python-Dev] PyObject_GenericGetAttr vs cygwin
Jason Tishler
jason@tishler.net
Thu, 8 Nov 2001 15:20:52 -0500
--CGQ4QxZ4DCp/f9YC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Michael,
On Thu, Nov 08, 2001 at 01:52:01PM -0500, Michael Hudson wrote:
> It works. Do you want to see the patches or shall I just check the
> changes in?
If they are just the standard "PyObject_HEAD_INIT(NULL)" style fix, then
please just commit them.
> BTW, _cursesmodule.c doesn't compile; you get things like:
>
> Warning: resolving _stdscr by linking to __imp__stdscr (auto-import)
> [snip]
> build/temp.cygwin-1.3.3-i686-2.2/_cursesmodule.o: In function `PyCurses_InitScr':
> /cygdrive/c/src/python/dist/src/Modules/_cursesmodule.c:1842: undefined reference to `acs_map'
> [snip]
I'm getting a feeling of deja vu from the above, but I can't quite
remember... I believe that the above is related to the auto-import
features recently added to Cygwin's binutils. Please send me your
/etc/setup/installed.db
via private email. In the meantime, I will dig some on my own.
> and contrary to README,
The Cygwin section of Python README has become stale -- I need to submit
a doco patch. Sigh...
> test_poll
The test_poll problem was fixed by:
http://sources.redhat.com/ml/cygwin-patches/2001-q3/msg00109.html
and released in Cygwin 1.3.4.
> and threads seem to work fine.
There is still one known Cygwin pthreads hang. If interested, see the
following for the current state of affairs:
http://sources.redhat.com/ml/cygwin-developers/2001-10/msg00193.html
> test_strftime is still bust, though:
The test_strftime problem was fixed by:
http://sources.redhat.com/ml/newlib/2001/msg00504.html
and released in Cygwin 1.3.4.
I've attached the latest README, since it is the most complete description
of the current state.
Thanks,
Jason
--CGQ4QxZ4DCp/f9YC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="python-2.1.1.README"
$Id: README,v 1.10 2001/09/26 13:28:31 jt Exp $
Abstract:
This is the README for the Cygwin Python distribution.
As of Python 2.1, Cygwin Python is built with a DLL core very similar
to how Win32 Python is built. This enables Cygwin Python to support
building shared extensions with the traditional Misc/Makefile.pre.in
and the newer distutils methods.
As of Python 2.1.1-2, the Cygwin Python port is essentially complete (at
least for Windows NT 4.0 and 2000). The most notable changes are the
addition of the _tkinter module and the elimination of the test_poll hang.
I was tempted to enable threading in the 2.1.1-2 release too.
Unfortunately, there is still one known problem with Cygwin's pthreads
support. So, I opted for the more prudent choice which is to continue
to disable threading until this problem is resolved. See the issues
section for more details, if interested.
Requirements:
The following packages or later are required to build and/or execute
Cygwin Python:
Cygwin 1.3.3-2
gcc 2.95.3-1
The following packages or later are required to build and/or execute
some of the standard Cygwin Python extension modules:
gdbm-1.8.0-3 (gdbm)
ncurses-5.2-5 (_curses and _curses_panel)
readline 4.2-3 (readline)
zlib 1.1.3-6 (zlib)
tcltk-20001125-1 (_tkinter)
Install:
Cygwin Python does not require any special installation procedures.
However, to use the _tkinter module you must define the following
environment variables:
$ export TCL_LIBRARY=$(cygpath -w /usr/share/tcl8.0)
$ export TK_LIBRARY=$(cygpath -w /usr/share/tk8.0)
since tcltk-20001125-1 is a native Win32 (i.e., not Cygwin) application.
Source:
The Python source builds OOTB under Cygwin. However, there are a few
minor issues so the source has been patched to correct them.
The following patches have been submitted to Python CVS:
http://sourceforge.net/tracker/index.php?func=detail&aid=429442&group_id=5470&atid=305470
http://sourceforge.net/tracker/index.php?func=detail&aid=443669&group_id=5470&atid=305470
http://sourceforge.net/tracker/index.php?func=detail&aid=459385&group_id=5470&atid=305470
http://sourceforge.net/tracker/index.php?func=detail&aid=462255&group_id=5470&atid=305470
http://sourceforge.net/tracker/index.php?func=detail&aid=462258&group_id=5470&atid=305470
for consideration and have been accepted into Python CVS. Hence, these
minor issues will be resolved in Python 2.2.
I also added the following files to the source archive:
CYGWIN-PATCHES/README
CYGWIN-PATCHES/build.sh
CYGWIN-PATCHES/python.patch
and renamed the original source archive to match Cygwin's setup.exe
naming conventions.
To restore the Python source to its original state, perform the following:
$ cd python-2.1.1
$ patch -R -p1 <CYGWIN-PATCHES/python.patch
$ autoconf
$ rm -fr CYGWIN-PATCHES
Build:
This distribution has been configured as follows:
configure --prefix=/usr
See CYGWIN-PATCHES/build.sh in the source archive for my exact build
recipe for configuring, making, and packaging this distribution.
Test:
On NT/2000, Cygwin Python passes all tests. Use the following to run the
regression test:
$ make test
On 9X/Me, Cygwin Python hangs in test_select and test_socket fails. Use the
following to run the regression test:
$ make TESTOPTS='-l -x test_select' test
Note that the above 9X/Me regression test results has been reported to me.
I do not have access to 9X/Me so I cannot verify this behavior myself.
Issues:
The following are the known Cygwin Python issues:
1. On all platforms, the test_strftime regression test fails due to a bug in
newlibs's strftime(). See the following for details:
http://sources.redhat.com/ml/newlib/2001/msg00504.html
This bug has been corrected in the Cygwin 2001-Sep-13 snapshot. So,
upgrade to this snapshot, Cygwin 1.3.4, or later if this affects you.
2. On 9X/ME, the regression test test_select hangs and test_socket fail.
3. The _tkinter extension module will only be built if the X11 header files
from the tcltk-20001125-1 source archive have been copied to /usr/include:
$ mkdir -p /usr/include/X11
$ tar -xzf tcltk-20001125-1-src.tar.gz
$ cp tcltk-20001125-1/tk/xlib/X11/*.h /usr/include/X11
4. Although Cygwin Python builds OOTB with threading enabled, there is a known
but non-trivial to fix race condition in Cygwin's pthreads support. Hence, I
have decided to continue to disable threading until this problem is corrected.
If interested, see the following mailing list thread for the gory details:
http://www.cygwin.com/ml/cygwin/2001-09/msg01543.html
Homepage:
The primary Python web site is:
http://www.python.org/
Download:
The primary Python ftp site is:
ftp://ftp.python.org/pub/python/
Mailing Lists:
Please report problems, suggestions, etc. dependent on their nature to one of
the following:
python-list@python.org
cygwin@sources.redhat.com
Maintainer:
Jason Tishler <jason@tishler.net>
--CGQ4QxZ4DCp/f9YC--