Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion av/video/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ def copy_bytes_to_plane(
end_row = plane.height
step = 1

i, j = cython.declare(cython.int)
for row in range(start_row, end_row, step):
i_pos = row * i_stride
if flip_horizontal:
Expand Down
33 changes: 8 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,19 @@
import shlex
import subprocess
import sys
from time import sleep

if platform.system() == "Darwin":
major_version = int(platform.mac_ver()[0].split(".")[0])
if major_version < 12:
raise OSError("You are using an EOL, unsupported, and out-of-date OS.")


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)

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"
)
if os.getenv("GITHUB_ACTIONS") == "true" or is_virtualenv():
pass
else:
print("\033[1;91mWarning!\033[0m You are not using a virtual environment")
if not (os.getenv("GITHUB_ACTIONS") == "true" or is_virtualenv()):
raise ValueError("You are not using a virtual environment")


from Cython.Build import cythonize
Expand Down Expand Up @@ -159,16 +148,10 @@ def parse_cflags(raw_flags):
FFMPEG_DIR = arg.split("=")[1]
del sys.argv[i]

# Do not cythonize or use pkg-config when cleaning.
use_pkg_config = platform.system() != "Windows"
if len(sys.argv) > 1 and sys.argv[1] == "clean":
cythonize = lambda ext, **kwargs: [ext]
use_pkg_config = False

# Locate ffmpeg libraries and headers.
if FFMPEG_DIR is not None:
extension_extra = get_config_from_directory(FFMPEG_DIR)
elif use_pkg_config:
elif platform.system() != "Windows":
extension_extra = get_config_from_pkg_config()
else:
extension_extra = {
Expand Down
Loading