Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyogg / pyogg-paths.patch
blobc7f1933878b4f84071777936d971fbc829f7961a
1 diff --git a/pyogg/flac.py b/pyogg/flac.py
2 index 37cc788..9fb7e95 100644
3 --- a/pyogg/flac.py
4 +++ b/pyogg/flac.py
5 @@ -49,7 +49,7 @@ __here = os.getcwd()
6 libflac = None
8 try:
9 - libflac = ExternalLibrary.load("FLAC", tests = [lambda lib: hasattr(lib, "FLAC__EntropyCodingMethodTypeString")])
10 + libflac = ctypes.CDLL('@flacLibPath@')
11 except ExternalLibraryError:
12 pass
13 except:
14 diff --git a/pyogg/ogg.py b/pyogg/ogg.py
15 index 7264774..2702e24 100644
16 --- a/pyogg/ogg.py
17 +++ b/pyogg/ogg.py
18 @@ -54,7 +54,7 @@ __here = os.getcwd()
19 libogg = None
21 try:
22 - libogg = ExternalLibrary.load("ogg", tests = [lambda lib: hasattr(lib, "oggpack_writeinit")])
23 + libogg = ctypes.CDLL('@oggLibPath@')
24 except ExternalLibraryError:
25 pass
26 except:
27 diff --git a/pyogg/opus.py b/pyogg/opus.py
28 index 81e73da..640e59c 100644
29 --- a/pyogg/opus.py
30 +++ b/pyogg/opus.py
31 @@ -130,7 +130,7 @@ __here = os.getcwd()
32 libopus = None
34 try:
35 - libopus = ExternalLibrary.load("opus", tests = [lambda lib: hasattr(lib, "opus_encoder_get_size")])
36 + libopus = ctypes.CDLL('@opusLibPath@')
37 except ExternalLibraryError:
38 pass
39 except:
40 @@ -139,7 +139,7 @@ except:
41 libopusfile = None
43 try:
44 - libopusfile = ExternalLibrary.load("opusfile", tests = [lambda lib: hasattr(lib, "opus_head_parse")])
45 + libopusfile = ctypes.CDLL('@opusFileLibPath@')
46 except ExternalLibraryError:
47 pass
48 except:
49 diff --git a/pyogg/vorbis.py b/pyogg/vorbis.py
50 index a8e4792..6f44d2d 100644
51 --- a/pyogg/vorbis.py
52 +++ b/pyogg/vorbis.py
53 @@ -52,7 +52,7 @@ __here = os.getcwd()
54 libvorbis = None
56 try:
57 - libvorbis = ExternalLibrary.load("vorbis", tests = [lambda lib: hasattr(lib, "vorbis_info_init")])
58 + libvorbis = ctypes.CDLL('@vorbisLibPath@')
59 except ExternalLibraryError:
60 pass
61 except:
62 @@ -61,7 +61,7 @@ except:
63 libvorbisfile = None
65 try:
66 - libvorbisfile = ExternalLibrary.load("vorbisfile", tests = [lambda lib: hasattr(lib, "ov_clear")])
67 + libvorbisfile = ctypes.CDLL('@vorbisFileLibPath@')
68 except ExternalLibraryError:
69 pass
70 except:
71 @@ -70,7 +70,7 @@ except:
72 libvorbisenc = None
74 try:
75 - libvorbisenc = ExternalLibrary.load("vorbisenc", tests = [lambda lib: hasattr(lib, "vorbis_encode_init")])
76 + libvorbisenc = ctypes.CDLL('@vorbisEncLibPath@')
77 except ExternalLibraryError:
78 pass
79 except: