Skip to content

Commit b42197c

Browse files
authored
Port code from CygwinCCompiler to UnixCCompiler
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.
1 parent 4435cec commit b42197c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

distutils/unixccompiler.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ class UnixCCompiler(CCompiler):
141141
xcode_stub_lib_format = dylib_lib_format
142142
if sys.platform == "cygwin":
143143
exe_extension = ".exe"
144+
shared_lib_extension = ".dll.a"
145+
dylib_lib_extension = ".dll"
146+
static_lib_format = shared_lib_format = "lib%s%s"
147+
dylib_lib_format = "cyg%s%s"
144148

145149
def preprocess(
146150
self,

0 commit comments

Comments
 (0)