In a mingw shell it will call os.uname() which starts with MINGW..
resulting in bogus results. So just check for sys.platform which
is always "cygwin".
See #5143
pip has recently started to compare wheel tags with system supported wheel
tags, and as it turns out build tools just use sysconfig.get_platform() to generate
a tag (in setuptools, wheel, packaging, etc) for non-official platforms. For
official platforms they do various normalization steps and use other sources.
Since we can't really patch all those packages we need to provide a platform
string that wont change between updates.
* Don't include the cygwin version in it anymore, since that can change on updates.
* Hardcode to "cygwin" since builing for cygwin can change the output of os.uname()
The later breaks detection of MSYS2 compared to cygwin, but ideally no one should
depend on it, and we want to get rid of the differences there anyway.
Fixes#5143
* drop all distutils patches, distutils is gone
* drop all setup.py patches, that's gone too
* refresh the 32bit rebase (things changed, but I added
it to the same make target, hopefully still works)
* adjust the new module building code to depend on the import
lib and also add the build dir to the library path so it can
be found.
* ctypes dropped vendored things, so remove code deleting it
* the code printing a warning if a module build fails no longer
exists, so drop the "tee" stuff and the error check there
* 006-3.7-ftm.patch: code no longer exists and builds fine without
* 010-3.8-nis-cygwin.patch: code no longer exists and builds fine without
* 012-3.8-pep3149-cygwin.patch: refreshed
* 013-3.8-tkinter-cygwin.patch: code no longer exists and builds fine without
* 28881-backport.patch, 930-fix-missing-tcp-include.patch: included in the new release
* 970-ossaudiodev.patch: work around "error: initializer element is not constant"
remove useless permissions change
* remove sed for cgi, cgi is deprecated and about to be dropped
* remove CPPFLAGS/LDFLAGS. it leaks into sysconfig and builds fine without it
* don't set CXX (defaults to g++ otherwise). nure sure why an absolute path is
needed here and not for CC. It builds fine without it.
* remove ac_cv_func_bind_textdomain_codeset override, gets detected correctly
* drop LC_CTYPE, we default to utf-8
* remove EXTRA_CFLAGS, cpython supports CFLAGS since forever
* remove some optdepends commented code
In some cases this will introduce cycles which could likely be cleaned
up by only depending on some unix tools instead of the whole autotools.
Rebuilding doesn't make much sense at this point since it just adds a subset
of base-devel which is still installed by default.
The main change here is that sys.platform == 'cygwin', which allows
us to drop various changes for extending cygwin checks. Fewer patches
and less likely that we miss to patch a new cygwin check on updates.
If one really needs to check for msys Python then this still works:
sysconfig.get_platform().startswith("msys")