Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / nextcord / paths.patch
blob0b0e4c50fb9dd358b4ca128fbe100c689aa8000c
1 diff --git a/nextcord/opus.py b/nextcord/opus.py
2 index b1119a8e..b7c9c713 100644
3 --- a/nextcord/opus.py
4 +++ b/nextcord/opus.py
5 @@ -233,7 +233,7 @@ def _load_default() -> bool:
6 _filename = os.path.join(_basedir, "bin", f"libopus-0.{_target}.dll")
7 _lib = libopus_loader(_filename)
8 else:
9 - opus = ctypes.util.find_library("opus")
10 + opus = "@libopus@"
12 if opus is None:
13 _lib = None
14 diff --git a/nextcord/player.py b/nextcord/player.py
15 index 5c7daf52..48a11eb7 100644
16 --- a/nextcord/player.py
17 +++ b/nextcord/player.py
18 @@ -127,7 +127,7 @@ class FFmpegAudio(AudioSource):
19 self,
20 source: Union[str, io.BufferedIOBase],
22 - executable: str = "ffmpeg",
23 + executable: str = "@ffmpeg@",
24 args: Any,
25 **subprocess_kwargs: Any,
26 ) -> None:
27 @@ -254,7 +254,7 @@ class FFmpegPCMAudio(FFmpegAudio):
28 self,
29 source: Union[str, io.BufferedIOBase],
31 - executable: str = "ffmpeg",
32 + executable: str = "@ffmpeg@",
33 pipe: bool = False,
34 stderr: Optional[IO[str]] = None,
35 before_options: Optional[str] = None,
36 @@ -357,7 +357,7 @@ class FFmpegOpusAudio(FFmpegAudio):
38 bitrate: int = 128,
39 codec: Optional[str] = None,
40 - executable: str = "ffmpeg",
41 + executable: str = "@ffmpeg@",
42 pipe: bool = False,
43 stderr=None,
44 before_options=None,
45 @@ -510,7 +510,7 @@ class FFmpegOpusAudio(FFmpegAudio):
46 """
48 method = method or "native"
49 - executable = executable or "ffmpeg"
50 + executable = executable or "@ffmpeg@"
51 probefunc = fallback = None
53 if isinstance(method, str):
54 @@ -555,9 +555,9 @@ class FFmpegOpusAudio(FFmpegAudio):
56 @staticmethod
57 def _probe_codec_native(
58 - source, executable: str = "ffmpeg"
59 + source, executable: str = "@ffmpeg@"
60 ) -> Tuple[Optional[str], Optional[int]]:
61 - exe = executable[:2] + "probe" if executable in ("ffmpeg", "avconv") else executable
62 + exe = executable[:-4] + "probe" if executable.endswith(("ffmpeg", "avconv")) else executable
63 args = [
64 exe,
65 "-v",
66 @@ -584,7 +584,7 @@ class FFmpegOpusAudio(FFmpegAudio):
68 @staticmethod
69 def _probe_codec_fallback(
70 - source, executable: str = "ffmpeg"
71 + source, executable: str = "@ffmpeg@"
72 ) -> Tuple[Optional[str], Optional[int]]:
73 args = [executable, "-hide_banner", "-i", source]
74 proc = subprocess.Popen(