Repository: python-pillow/Pillow

Issue:
Update tiff and tk tcl 8.5 versions



Discussion:
Note that this conflicts with #1298

Thanks, I've updated that PR.

This didn't actually work, as none of the tcl/tks were recognized in the pillow build https://ci.appveyor.com/project/Pythonpillow/pillow/build/2.9.pre.43/job/rhtd5q2i5gr7hq96#L849

vs:

https://ci.appveyor.com/project/Pythonpillow/pillow/build/2.9.pre.42/job/hbpd30gef96gqy22#L917

https://github.com/python-pillow/Pillow/blob/master/winbuild/build_dep.py#L97  

hardwired versioning...


Resolving patch:
diff --git a/winbuild/build_dep.py b/winbuild/build_dep.py
--- a/winbuild/build_dep.py
+++ b/winbuild/build_dep.py
@@ -91,18 +91,19 @@ def extract_openjpeg(compiler):
 """ % compiler
 
 
-def cp_tk():
+def cp_tk(ver_85, ver_86):
+    versions = {'ver_85':ver_85, 'ver_86':ver_86}
     return r"""
-mkdir %INCLIB%\tcl85\include\X11
-copy /Y /B %BUILD%\tcl8.5.13\generic\*.h %INCLIB%\tcl85\include\
-copy /Y /B %BUILD%\tk8.5.13\generic\*.h %INCLIB%\tcl85\include\
-copy /Y /B %BUILD%\tk8.5.13\xlib\X11\* %INCLIB%\tcl85\include\X11\
-
-mkdir %INCLIB%\tcl86\include\X11
-copy /Y /B %BUILD%\tcl8.6.4\generic\*.h %INCLIB%\tcl86\include\
-copy /Y /B %BUILD%\tk8.6.4\generic\*.h %INCLIB%\tcl86\include\
-copy /Y /B %BUILD%\tk8.6.4\xlib\X11\* %INCLIB%\tcl86\include\X11\
-"""
+mkdir %%INCLIB%%\tcl85\include\X11
+copy /Y /B %%BUILD%%\tcl%(ver_85)s\generic\*.h %%INCLIB%%\tcl85\include\
+copy /Y /B %%BUILD%%\tk%(ver_85)s\generic\*.h %%INCLIB%%\tcl85\include\
+copy /Y /B %%BUILD%%\tk%(ver_85)s\xlib\X11\* %%INCLIB%%\tcl85\include\X11\
+
+mkdir %%INCLIB%%\tcl86\include\X11
+copy /Y /B %%BUILD%%\tcl%(ver_86)s\generic\*.h %%INCLIB%%\tcl86\include\
+copy /Y /B %%BUILD%%\tk%(ver_86)s\generic\*.h %%INCLIB%%\tcl86\include\
+copy /Y /B %%BUILD%%\tk%(ver_86)s\xlib\X11\* %%INCLIB%%\tcl86\include\X11\
+""" % versions
 
 
 def header():
@@ -305,7 +306,7 @@ def add_compiler(compiler):
 mkdirs()
 fetch_libs()
 # extract_binlib()
-script = [header(), cp_tk()]
+script = [header(), cp_tk(libs['tk-8.5']['version'],libs['tk-8.6']['version'] )]
 
 
 if 'PYTHON' in os.environ:
diff --git a/winbuild/config.py b/winbuild/config.py
--- a/winbuild/config.py
+++ b/winbuild/config.py
@@ -23,7 +23,7 @@
     },
          'tiff': {
     'url': 'ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.4.zip',
-    'hash': 'md5:8f538a34156188f9a8dcddb679c65d1e',  # not found - generated by wiredfool
+    'hash': 'md5:8f538a34156188f9a8dcddb679c65d1e',
     'dir': 'tiff-4.0.4',
    },
          'freetype': {
@@ -45,6 +45,7 @@
     'url': SF_MIRROR+'/project/tcl/Tcl/8.5.18/tk8518-src.zip',
     'hash': 'sha1:273f55148777413774aa722ecad25cabda1e31ae',
     'dir': '',
+    'version':'8.5.18',
     },
          'tcl-8.6': {
     'url': SF_MIRROR+'/project/tcl/Tcl/8.6.4/tcl864-src.zip',
@@ -55,12 +56,13 @@
     'url': SF_MIRROR+'/project/tcl/Tcl/8.6.4/tk864-src.zip',
     'hash': 'md5:111d45061a69e7f5250b6ec8ca7c4f35',
     'dir': '',
+    'version':'8.6.4',
     },
          'webp': {
     'url': 'http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz',
     'hash': 'sha1:1c307a61c4d0018620b4ba9a58e8f48a8d6640ef',
     'dir': 'libwebp-0.4.3',
-
+
     },
          'openjpeg': {
     'url': SF_MIRROR+'/project/openjpeg/openjpeg/2.1.0/openjpeg-2.1.0.tar.gz',
@@ -68,7 +70,7 @@
     'dir': 'openjpeg-2.1.0',
     },
 
-     }
+}
 
 bin_libs = {
          'openjpeg': {


Test patch: