Skip to content

Commit

Permalink
Add warnings when compiling from source
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Feb 14, 2025
1 parent 0eca76e commit 9e3831a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@
import shlex
import subprocess
import sys
from time import sleep


def is_virtualenv():
return sys.base_prefix != sys.prefix


if platform.system() == "Darwin":
major_version = int(platform.mac_ver()[0].split(".")[0])
if major_version < 12:
print(
"\033[1;91mWarning!\033[0m You are using an EOL, unsupported, and out-of-date OS."
)
sleep(3)

# Don't show message when using our project tooling.
if not is_virtualenv() or os.environ.get("_PYAV_ACTIVATED", "") != "1":
print(
"\n\033[1;91mWarning!\033[0m You are installing from source.\n"
"It is \033[1;37mEXPECTED\033[0m that it will fail. You are \033[1;37mREQUIRED\033[0m"
" to use ffmpeg 7.\nYou \033[1;37mMUST\033[0m have Cython, pkg-config, and a C compiler.\n"
)
sleep(3)


from Cython.Build import cythonize
from Cython.Compiler.AutoDocTransforms import EmbedSignature
Expand Down

0 comments on commit 9e3831a

Please sign in to comment.