Skip to content

Commit a39820f

Browse files
changed search for libs on Windows.
1 parent 1624ead commit a39820f

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

py_gd/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@
3333
# "This kludge is only written to support Anaconda installs")
3434

3535
# alternative ugly kludge: add lib dir to PATH:
36-
if not (os.path.isfile(os.path.join(libpath, 'libpng16.dll')) and
36+
if (os.path.isfile(os.path.join(libpath, 'libpng16.dll')) and
3737
os.path.isfile(os.path.join(libpath, 'zlib.dll')) and
3838
os.path.isfile(os.path.join(libpath, 'libgd.dll'))):
39-
raise RuntimeError("Can't find dlls for libgd, libpng, and libz.\n"
40-
"This kludge is only written to support Anaconda installs\n",
41-
"you may need to add some logic for other library locations",
42-
)
43-
os.environ['PATH'] = libpath + os.pathsep + os.environ['PATH']
39+
os.environ['PATH'] = libpath + os.pathsep + os.environ['PATH']
40+
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+
# )
4445
try:
4546
from .py_gd import * # noqa: F401
4647

0 commit comments

Comments
 (0)