File tree 4 files changed +14
-3
lines changed
4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,10 @@ def test_internals(self):
192
192
assert not im .readonly
193
193
194
194
@pytest .mark .skipif (is_win32 (), reason = "Test requires opening tempfile twice" )
195
+ @pytest .mark .skipif (
196
+ sys .platform == "cygwin" ,
197
+ reason = "Test requires opening an mmaped file for writing" ,
198
+ )
195
199
def test_readonly_save (self , tmp_path ):
196
200
temp_file = str (tmp_path / "temp.bmp" )
197
201
shutil .copy ("Tests/images/rgb32bf-rgba.bmp" , temp_file )
Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ def build_extensions(self):
898
898
else :
899
899
self ._remove_extension ("PIL._webp" )
900
900
901
- tk_libs = ["psapi" ] if sys .platform == "win32" else []
901
+ tk_libs = ["psapi" ] if sys .platform in ( "win32" , "cygwin" ) else []
902
902
self ._update_extension ("PIL._imagingtk" , tk_libs )
903
903
904
904
build_ext .build_extensions (self )
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ TkImaging_Init(Tcl_Interp *interp) {
219
219
220
220
#define TKINTER_FINDER "PIL._tkinter_finder"
221
221
222
- #if defined(_WIN32 ) || defined(__WIN32__ ) || defined(WIN32 )
222
+ #if defined(_WIN32 ) || defined(__WIN32__ ) || defined(WIN32 ) || defined( __CYGWIN__ )
223
223
224
224
/*
225
225
* On Windows, we can't load the tkinter module to get the Tcl or Tk symbols,
Original file line number Diff line number Diff line change 25
25
#endif
26
26
#endif
27
27
28
- #ifdef _WIN32
28
+ #if defined( _WIN32 ) || defined( __CYGWIN__ )
29
29
30
30
#define WIN32_LEAN_AND_MEAN
31
31
#include <Windows.h>
32
32
33
+ #ifdef __CYGWIN__
34
+ #undef _WIN64
35
+ #undef _WIN32
36
+ #undef __WIN32__
37
+ #undef WIN32
38
+ #endif
39
+
33
40
#else
34
41
/* For System that are not Windows, we'll need to define these. */
35
42
You can’t perform that action at this time.
0 commit comments