Skip to content

Commit

Permalink
Port code from CygwinCCompiler to UnixCCompiler
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DWesl committed May 14, 2023
1 parent 4435cec commit b42197c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions distutils/unixccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ class UnixCCompiler(CCompiler):
xcode_stub_lib_format = dylib_lib_format
if sys.platform == "cygwin":
exe_extension = ".exe"
shared_lib_extension = ".dll.a"
dylib_lib_extension = ".dll"
static_lib_format = shared_lib_format = "lib%s%s"
dylib_lib_format = "cyg%s%s"

def preprocess(
self,
Expand Down

0 comments on commit b42197c

Please sign in to comment.