From 5d910f15757d3f9771933b95517de9726421ac0b Mon Sep 17 00:00:00 2001 From: Mike Boers <github@mikeboers.com> Date: Tue, 7 Apr 2020 16:02:52 -0400 Subject: [PATCH 1/2] Use Python3-style virtualenv invocation. --- scripts/activate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/activate.sh b/scripts/activate.sh index 1fdd6ee..2e7ad42 100755 --- a/scripts/activate.sh +++ b/scripts/activate.sh @@ -61,7 +61,7 @@ print("{}{}.{}".format(platform.python_implementation().lower(), *sys.version_in if [[ ! -e "$PYAV_VENV/bin/python" ]]; then mkdir -p "$PYAV_VENV" - virtualenv -p "$PYAV_PYTHON" "$PYAV_VENV" + "$PYAV_PYTHON" -m venv "$PYAV_VENV" "$PYAV_VENV/bin/pip" install --upgrade pip setuptools fi -- GitLab From 8794bd9d39293fed2151e168b4462fccab149cb2 Mon Sep 17 00:00:00 2001 From: Mike Boers <github@mikeboers.com> Date: Tue, 7 Apr 2020 16:03:20 -0400 Subject: [PATCH 2/2] Test for FFmpeg 4.0 at compile time. --- include/libav.pxd | 6 ++++++ include/libav.pyav.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/include/libav.pxd b/include/libav.pxd index 60099df..688a150 100644 --- a/include/libav.pxd +++ b/include/libav.pxd @@ -6,6 +6,12 @@ cdef extern from "pyav/config.h" nogil: char* PYAV_VERSION_STR char* PYAV_COMMIT_STR + +# This asserts we've found a usable version of the various libraries. +cdef extern from "libav.pyav.h" nogil: + pass + + include "libavutil/avutil.pxd" include "libavutil/channel_layout.pxd" include "libavutil/dict.pxd" diff --git a/include/libav.pyav.h b/include/libav.pyav.h index e69de29..a8c297e 100644 --- a/include/libav.pyav.h +++ b/include/libav.pyav.h @@ -0,0 +1,6 @@ + +#include "libavcodec/version.h" + +#if LIBAVCODEC_VERSION_MAJOR < 58 +#error PyAV v7.0 requires FFmpeg v4.0 or higher; please install PyAV v6.2 for FFmpeg < v4.0. +#endif -- GitLab