1diff -ru PySDL2-0.9.7-old/sdl2/dll.py PySDL2-0.9.7/sdl2/dll.py
2--- PySDL2-0.9.7-old/sdl2/dll.py 2020-02-15 09:36:29.000000000 +0100
3+++ PySDL2-0.9.7/sdl2/dll.py 2020-09-23 20:24:09.365497270 +0200
4@@ -94,15 +94,16 @@
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+ def __init__(self, libinfo, libfile):
10 self._dll = None
11 self._libname = libinfo
12 self._version = None
13- foundlibs = _findlib(libnames, path)
14- dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
15- if len(foundlibs) == 0:
16- raise RuntimeError("could not find any library for %s (%s)" %
17- (libinfo, dllmsg))
18+ #foundlibs = _findlib(libnames, path)
19+ #dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
20+ #if len(foundlibs) == 0:
21+ # raise RuntimeError("could not find any library for %s (%s)" %
22+ # (libinfo, dllmsg))
23+ foundlibs = [ libfile ]
24 for libfile in foundlibs:
25 try:
26 self._dll = CDLL(libfile)
27@@ -117,9 +118,9 @@
28 if self._dll is None:
29 raise RuntimeError("found %s, but it's not usable for the library %s" %
30 (foundlibs, libinfo))
31- if path is not None and sys.platform in ("win32",) and \
32- path in self._libfile:
33- os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
34+ #if path is not None and sys.platform in ("win32",) and \
35+ # path in self._libfile:
36+ # os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
37
38 def bind_function(self, funcname, args=None, returns=None, added=None):
39 """Binds the passed argument and return value types to the specified
40@@ -220,7 +221,7 @@
41 return
42
43 try:
44- dll = DLL("SDL2", ["SDL2", "SDL2-2.0"], os.getenv("PYSDL2_DLL_PATH"))
45+ dll = DLL("SDL2", "@sdl2@")
46 except RuntimeError as exc:
47 raise ImportError(exc)
48
49diff -ru PySDL2-0.9.7-old/sdl2/sdlgfx.py PySDL2-0.9.7/sdl2/sdlgfx.py
50--- PySDL2-0.9.7-old/sdl2/sdlgfx.py 2020-02-02 11:07:00.000000000 +0100
51+++ PySDL2-0.9.7/sdl2/sdlgfx.py 2020-09-23 20:23:56.997419129 +0200
52@@ -39,8 +39,7 @@
53 ]
54
55 try:
56- dll = DLL("SDL2_gfx", ["SDL2_gfx", "SDL2_gfx-1.0"],
57- os.getenv("PYSDL2_DLL_PATH"))
58+ dll = DLL("SDL2_gfx", "@sdl2_gfx@")
59 except RuntimeError as exc:
60 raise ImportError(exc)
61
62diff -ru PySDL2-0.9.7-old/sdl2/sdlimage.py PySDL2-0.9.7/sdl2/sdlimage.py
63--- PySDL2-0.9.7-old/sdl2/sdlimage.py 2020-02-02 11:07:00.000000000 +0100
64+++ PySDL2-0.9.7/sdl2/sdlimage.py 2020-09-23 20:23:50.085375658 +0200
65@@ -27,8 +27,7 @@
66 ]
67
68 try:
69- dll = DLL("SDL2_image", ["SDL2_image", "SDL2_image-2.0"],
70- os.getenv("PYSDL2_DLL_PATH"))
71+ dll = DLL("SDL2_image", "@sdl2_image@")
72 except RuntimeError as exc:
73 raise ImportError(exc)
74
75diff -ru PySDL2-0.9.7-old/sdl2/sdlmixer.py PySDL2-0.9.7/sdl2/sdlmixer.py
76--- PySDL2-0.9.7-old/sdl2/sdlmixer.py 2020-02-02 11:07:00.000000000 +0100
77+++ PySDL2-0.9.7/sdl2/sdlmixer.py 2020-09-23 20:23:46.117350771 +0200
78@@ -53,8 +53,7 @@
79 ]
80
81 try:
82- dll = DLL("SDL2_mixer", ["SDL2_mixer", "SDL2_mixer-2.0"],
83- os.getenv("PYSDL2_DLL_PATH"))
84+ dll = DLL("SDL2_mixer", "@sdl2_mixer@")
85 except RuntimeError as exc:
86 raise ImportError(exc)
87
88diff -ru PySDL2-0.9.7-old/sdl2/sdlttf.py PySDL2-0.9.7/sdl2/sdlttf.py
89--- PySDL2-0.9.7-old/sdl2/sdlttf.py 2020-02-02 11:07:00.000000000 +0100
90+++ PySDL2-0.9.7/sdl2/sdlttf.py 2020-09-23 20:23:40.069312931 +0200
91@@ -39,8 +39,7 @@
92 ]
93
94 try:
95- dll = DLL("SDL2_ttf", ["SDL2_ttf", "SDL2_ttf-2.0"],
96- os.getenv("PYSDL2_DLL_PATH"))
97+ dll = DLL("SDL2_ttf", "@sdl2_ttf@")
98 except RuntimeError as exc:
99 raise ImportError(exc)
100