mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Use the Windows functions to get TCL functions on Cygwin.
This is related to linking semantics, so Cygwin should follow the Windows codepath.
This commit is contained in:
parent
f671ec82fa
commit
c8391aaa4b
2
setup.py
2
setup.py
|
@ -887,7 +887,7 @@ class pil_build_ext(build_ext):
|
|||
else:
|
||||
self._remove_extension("PIL._webp")
|
||||
|
||||
tk_libs = ["psapi"] if sys.platform == "win32" else []
|
||||
tk_libs = ["psapi"] if (sys.platform == "win32" or sys.platform == "cygwin") else []
|
||||
self._update_extension("PIL._imagingtk", tk_libs)
|
||||
|
||||
build_ext.build_extensions(self)
|
||||
|
|
|
@ -219,7 +219,7 @@ TkImaging_Init(Tcl_Interp *interp) {
|
|||
|
||||
#define TKINTER_FINDER "PIL._tkinter_finder"
|
||||
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
|
||||
|
||||
/*
|
||||
* On Windows, we can't load the tkinter module to get the Tcl or Tk symbols,
|
||||
|
|
|
@ -31,11 +31,18 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
#undef _WIN64
|
||||
#undef _WIN32
|
||||
#undef __WIN32__
|
||||
#undef WIN32
|
||||
#endif
|
||||
|
||||
#else
|
||||
/* For System that are not Windows, we'll need to define these. */
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user