-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port code from CygwinCCompiler to UnixCCompiler #209
Conversation
python-pillow/Pillow#7158 (comment) suggests that Cygwin uses UnixCCompiler rather than CygwinCCompiler by default, so UnixCCompiler would need to know how to find shared libraries, import libraries, and static libraries on Cygwin.
>>> result = compiler.find_library_file(dirs, 'abc').replace('\\', '/')
>>> if sys.platform == "cygwin":
... print(result == "/foo/bar/existing/cygabc.dll")
... else:
... print(result == "/foo/bar/existing/libabc.dylib")
True |
Given Cygwin seems to use |
#185 similarly feels CygwinCCompiler isn't used, although thinks it should be. |
How should I be fixing the doctests to not fail with working code on Cygwin? |
The odd doctests suggest having |
12769e5
to
d23e28a
Compare
Oh, heck. Tests on cygwin are currently disabled because ruff fails to install there. |
There's some recent progress on rust-lang/rust#79854; I'm somewhat curious how well the work done to cross-compile from Linux would carry over to cross-compiling from Windows. |
there wasn't any existing cygwin cross compiler available on mingw or msys, but there is one on fedora linux i also tried to get a cygwin cross compiler on archlinux: arch-cygwin (unofficial), it uses PKGBUILD (which is the same as what MSYS2 is using), |
Co-authored-by: DWesl <22566757+DWesl@users.noreply.github.com>
I don't see any problem with the doctests. Perhaps they've been resolved. The only failing test now is the failing coverage test, which is spurious and only there because the coverage is only checked on one platform, so it's ignorable. |
Port code from CygwinCCompiler to UnixCCompiler
It was a failure on the Cygwin doctests, which I think got disabled because there's no Rust compiler for Cygwin |
the problem is usually path conversion
you can kinda get rust here on cygwin, but there are many problems with path conversion and cygwin not being linux |
python-pillow/Pillow#7158 (comment) and
https://github.com/pypa/setuptools/blob/e76db4408e40a5c0a218ef6f652454f69c5aca59/setuptools/_distutils/ccompiler.py#L1055-L1058
suggest that Cygwin uses
UnixCCompiler
rather thanCygwinCCompiler
by default, soUnixCCompiler
would also need to know how to find shared libraries, import libraries, and static libraries on Cygwin.Port of #139 to
UnixCCompiler