1diff -ru PySDL2-0.9.6-old/sdl2/dll.py PySDL2-0.9.6/sdl2/dll.py
2--- PySDL2-0.9.6-old/sdl2/dll.py 2018-03-08 10:18:37.583471745 +0100
3+++ PySDL2-0.9.6/sdl2/dll.py 2018-03-08 10:20:06.705517520 +0100
4@@ -45,29 +45,31 @@
5 """Function wrapper around the different DLL functions. Do not use or
6 instantiate this one directly from your user code.
7 """
8- def __init__(self, libinfo, libnames, path=None):
9- self._dll = None
10- foundlibs = _findlib(libnames, path)
11- dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
12- if len(foundlibs) == 0:
13- raise RuntimeError("could not find any library for %s (%s)" %
14- (libinfo, dllmsg))
15- for libfile in foundlibs:
16- try:
17- self._dll = CDLL(libfile)
18- self._libfile = libfile
19- break
20- except Exception as exc:
21- # Could not load the DLL, move to the next, but inform the user
22- # about something weird going on - this may become noisy, but
23- # is better than confusing the users with the RuntimeError below
24- warnings.warn(repr(exc), DLLWarning)
25- if self._dll is None:
26- raise RuntimeError("found %s, but it's not usable for the library %s" %
27- (foundlibs, libinfo))
28- if path is not None and sys.platform in ("win32",) and \
29- path in self._libfile:
30- os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
31+ def __init__(self, libfile):
32+ self._dll = CDLL(libfile)
33+ self._libfile = libfile
34+ # self._dll = None
35+ # foundlibs = _findlib(libnames, path)
36+ # dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
37+ # if len(foundlibs) == 0:
38+ # raise RuntimeError("could not find any library for %s (%s)" %
39+ # (libinfo, dllmsg))
40+ # for libfile in foundlibs:
41+ # try:
42+ # self._dll = CDLL(libfile)
43+ # self._libfile = libfile
44+ # break
45+ # except Exception as exc:
46+ # # Could not load the DLL, move to the next, but inform the user
47+ # # about something weird going on - this may become noisy, but
48+ # # is better than confusing the users with the RuntimeError below
49+ # warnings.warn(repr(exc), DLLWarning)
50+ # if self._dll is None:
51+ # raise RuntimeError("found %s, but it's not usable for the library %s" %
52+ # (foundlibs, libinfo))
53+ # if path is not None and sys.platform in ("win32",) and \
54+ # path in self._libfile:
55+ # os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
56
57 def bind_function(self, funcname, args=None, returns=None, optfunc=None):
58 """Binds the passed argument and return value types to the specified
59@@ -110,7 +112,7 @@
60 return
61
62 try:
63- dll = DLL("SDL2", ["SDL2", "SDL2-2.0"], os.getenv("PYSDL2_DLL_PATH"))
64+ dll = DLL("SDL2")
65 except RuntimeError as exc:
66 raise ImportError(exc)
67
68diff -ru PySDL2-0.9.6-old/sdl2/sdlgfx.py PySDL2-0.9.6/sdl2/sdlgfx.py
69--- PySDL2-0.9.6-old/sdl2/sdlgfx.py 2018-03-08 10:18:37.585471769 +0100
70+++ PySDL2-0.9.6/sdl2/sdlgfx.py 2018-03-08 10:20:06.705517520 +0100
71@@ -34,8 +34,7 @@
72 ]
73
74 try:
75- dll = DLL("SDL2_gfx", ["SDL2_gfx", "SDL2_gfx-1.0"],
76- os.getenv("PYSDL2_DLL_PATH"))
77+ dll = DLL("SDL2_gfx")
78 except RuntimeError as exc:
79 raise ImportError(exc)
80
81diff -ru PySDL2-0.9.6-old/sdl2/sdlimage.py PySDL2-0.9.6/sdl2/sdlimage.py
82--- PySDL2-0.9.6-old/sdl2/sdlimage.py 2018-03-08 10:18:37.585471769 +0100
83+++ PySDL2-0.9.6/sdl2/sdlimage.py 2018-03-08 10:20:06.705517520 +0100
84@@ -26,8 +26,7 @@
85 ]
86
87 try:
88- dll = DLL("SDL2_image", ["SDL2_image", "SDL2_image-2.0"],
89- os.getenv("PYSDL2_DLL_PATH"))
90+ dll = DLL("SDL2_image")
91 except RuntimeError as exc:
92 raise ImportError(exc)
93
94diff -ru PySDL2-0.9.6-old/sdl2/sdlmixer.py PySDL2-0.9.6/sdl2/sdlmixer.py
95--- PySDL2-0.9.6-old/sdl2/sdlmixer.py 2018-03-08 10:18:37.585471769 +0100
96+++ PySDL2-0.9.6/sdl2/sdlmixer.py 2018-03-08 10:20:27.415758478 +0100
97@@ -50,8 +50,7 @@
98 ]
99
100 try:
101- dll = DLL("SDL2_mixer", ["SDL2_mixer", "SDL2_mixer-2.0"],
102- os.getenv("PYSDL2_DLL_PATH"))
103+ dll = DLL("SDL2_mixer")
104 except RuntimeError as exc:
105 raise ImportError(exc)
106
107diff -ru PySDL2-0.9.6-old/sdl2/sdlttf.py PySDL2-0.9.6/sdl2/sdlttf.py
108--- PySDL2-0.9.6-old/sdl2/sdlttf.py 2018-03-08 10:18:37.585471769 +0100
109+++ PySDL2-0.9.6/sdl2/sdlttf.py 2018-03-08 10:20:06.705517520 +0100
110@@ -38,8 +38,7 @@
111 ]
112
113 try:
114- dll = DLL("SDL2_ttf", ["SDL2_ttf", "SDL2_ttf-2.0"],
115- os.getenv("PYSDL2_DLL_PATH"))
116+ dll = DLL("SDL2_ttf")
117 except RuntimeError as exc:
118 raise ImportError(exc)
119