Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@
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.getenv("_PYAV_ACTIVATED", "") != "1":
print(
"\n\033[1;91mWarning!\033[0m You are installing from source.\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this of stuff really necessary? Have you been getting questions from users that are accidentally installing from source?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related... #1778

"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"
)
if os.getenv("GITHUB_ACTIONS") != "true":
sleep(3)


from Cython.Build import cythonize
from Cython.Compiler.AutoDocTransforms import EmbedSignature
Expand Down Expand Up @@ -141,7 +166,7 @@ def parse_cflags(raw_flags):
cythonize = lambda ext, **kwargs: [ext]
use_pkg_config = False

# Locate FFmpeg libraries and headers.
# Locate ffmpeg libraries and headers.
if FFMPEG_DIR is not None:
extension_extra = get_config_from_directory(FFMPEG_DIR)
elif use_pkg_config:
Expand Down
Loading