Skip to content

Commit dd058bf

Browse files
cleaned out kruft for lib finding on windows -- no longer needed.
1 parent f48950c commit dd058bf

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

py_gd/__init__.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,20 @@
1313
import sys
1414
import os
1515

16-
__version__ = "2.3.3"
16+
__version__ = "2.3.2"
1717

1818
if sys.platform.startswith('win'):
1919
# This only works for Anaconda / miniconda
2020
# On other systems, logic needs to be added here.
21+
# there must be a better way to do this -- why doesn't conda take care of it?
2122
libpath = os.path.join(os.path.split(sys.executable)[0], "Library", "bin")
2223

23-
# UGLY kludge for Windows: load the libgd dll with ctypes so it can be used by the extension
24-
# import ctypes
25-
# # note: need to load up the dependencies, too
26-
# # this is a serious kludge!
27-
# try:
28-
# libpng = ctypes.cdll.LoadLibrary(os.path.join(libpath,'libpng16.dll'))
29-
# zlib = ctypes.cdll.LoadLibrary(os.path.join(libpath,'zlib.dll'))
30-
# libgd = ctypes.cdll.LoadLibrary(os.path.join(libpath,'libgd.dll'))
31-
# except WindowsError as err:
32-
# raise WindowsError("Can't find dlls for libgd, libpng, and libz.\n"
33-
# "This kludge is only written to support Anaconda installs")
34-
35-
# alternative ugly kludge: add lib dir to PATH:
24+
# Add lib dir to PATH:
3625
if (os.path.isfile(os.path.join(libpath, 'libpng16.dll')) and
3726
os.path.isfile(os.path.join(libpath, 'zlib.dll')) and
3827
os.path.isfile(os.path.join(libpath, 'libgd.dll'))):
3928
os.environ['PATH'] = libpath + os.pathsep + os.environ['PATH']
4029

41-
# raise RuntimeError("Can't find dlls for libgd, libpng, and libz.\n"
42-
# "This kludge is only written to support Anaconda installs\n",
43-
# "you may need to add some logic for other library locations",
44-
# )
4530
try:
4631
from .py_gd import * # noqa: F401
4732

0 commit comments

Comments
 (0)