I've been working on compiling/installing Python on Cygwin and have hit upon an odd issue in the Makefile that seems to have been around for as long as there's been Cygwin support in it.
When building Python on Cygwin, both a libpython-X.Y.dll and a libpython-X.Y.dll.a are created. The latter is an "import library" consisting of stubs for functions in the DLL so that it can be linked to statically when building, for example, extension modules.
The odd bit is that in the altbininstall target (see ) if the $(DLLLIBRARY) variable is defined then only it is installed, while $(LDLIBRARY) (which in this cases references the import library) is *not* installed, except in $(prefix)/lib/pythonX.Y/config, which is not normally on the linker search path, or even included by python-config --ldflags. Therefore static linking to libpython fails, unless the search path is explicitly modified, or a symlink is created from $(prefix)/lib/pythonX.Y/config/libpython.dll.a to $(prefix)/lib.
In fact Cygwin's own package for Python manually creates the latter symlink in its install script. But it's not clear why Python's Makefile doesn't install this file in the first place. In other words, why not install $LDLIBRARY regardless?