File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 66import shlex
77import subprocess
88import sys
9+ from time import sleep
10+
11+
12+ def is_virtualenv ():
13+ return sys .base_prefix != sys .prefix
14+
15+
16+ if platform .system () == "Darwin" :
17+ major_version = int (platform .mac_ver ()[0 ].split ("." )[0 ])
18+ if major_version < 12 :
19+ print (
20+ "\033 [1;91mWarning!\033 [0m You are using an EOL, unsupported, and out-of-date OS."
21+ )
22+ sleep (3 )
23+
24+ # Don't show message when using our project tooling.
25+ if not is_virtualenv () or os .getenv ("_PYAV_ACTIVATED" , "" ) != "1" :
26+ print (
27+ "\n \033 [1;91mWarning!\033 [0m You are installing from source.\n "
28+ "It is \033 [1;37mEXPECTED\033 [0m that it will fail. You are \033 [1;37mREQUIRED\033 [0m"
29+ " to use ffmpeg 7.\n You \033 [1;37mMUST\033 [0m have Cython, pkg-config, and a C compiler.\n "
30+ )
31+ if os .getenv ("GITHUB_ACTIONS" ) != "true" :
32+ sleep (3 )
33+
934
1035from Cython .Build import cythonize
1136from Cython .Compiler .AutoDocTransforms import EmbedSignature
@@ -141,7 +166,7 @@ def parse_cflags(raw_flags):
141166 cythonize = lambda ext , ** kwargs : [ext ]
142167 use_pkg_config = False
143168
144- # Locate FFmpeg libraries and headers.
169+ # Locate ffmpeg libraries and headers.
145170if FFMPEG_DIR is not None :
146171 extension_extra = get_config_from_directory (FFMPEG_DIR )
147172elif use_pkg_config :
You can’t perform that action at this time.
0 commit comments