From 04823db0ce78ae12d75f4e383232250cef20bf8a Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Thu, 1 Aug 2024 00:14:13 -0400 Subject: [PATCH] Put pip installs in Makefile --- .github/workflows/smoke.yml | 2 +- Makefile | 7 +++---- docs/Makefile | 4 ++++ scripts/build | 1 + scripts/build-deps | 3 --- tests/requirements.txt | 10 ---------- 6 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 tests/requirements.txt diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 485227334..18949e6e9 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -87,7 +87,7 @@ jobs: run: | . scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }} python -m av --version # Assert it can import. - scripts/test + make test - name: Docs if: matrix.config.extras diff --git a/Makefile b/Makefile index a31c7077b..4adb3b47f 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,7 @@ default: build build: - # Always try to install the Python dependencies they are cheap. - $(PIP) install --upgrade -r tests/requirements.txt + $(PIP) install --upgrade cython CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) $(PYTHON) setup.py build_ext --inplace --debug clean: @@ -29,12 +28,12 @@ fate-suite: rsync -vrltLW rsync://fate-suite.ffmpeg.org/fate-suite/ tests/assets/fate-suite/ lint: - $(PIP) install --upgrade -r tests/requirements.txt + $(PIP) install -U black isort flake8 flake8-pyproject pillow numpy mypy==1.10.0 black --check av examples tests setup.py flake8 av examples tests isort --check-only --diff av examples tests mypy av tests test: - $(PIP) install --upgrade -r tests/requirements.txt + $(PIP) install --upgrade cython numpy pillow pytest $(PYTHON) -m pytest diff --git a/docs/Makefile b/docs/Makefile index 9ebbf3c5d..e0662e90c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -4,6 +4,9 @@ SPHINXBUILD = sphinx-build BUILDDIR = _build FFMPEGDIR = _ffmpeg +PYAV_PIP ?= pip +PIP := $(PYAV_PIP) + ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) . .PHONY: clean html open upload default @@ -29,6 +32,7 @@ clean: rm -rf $(BUILDDIR) $(FFMPEGDIR) html: $(RENDERED) $(TAGFILE) + $(PIP) install -U sphinx==5.1.0 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html test: diff --git a/scripts/build b/scripts/build index c1e711d69..67b3836f2 100755 --- a/scripts/build +++ b/scripts/build @@ -21,5 +21,6 @@ which ffmpeg || exit 2 ffmpeg -version || exit 3 echo +$PYAV_PIP install -U cython 2> /dev/null "$PYAV_PYTHON" scripts/comptime.py "$PYAV_PYTHON" setup.py config build_ext --inplace || exit 1 diff --git a/scripts/build-deps b/scripts/build-deps index ef7ebff22..ab3b4b256 100755 --- a/scripts/build-deps +++ b/scripts/build-deps @@ -7,9 +7,6 @@ fi cd "$PYAV_ROOT" -# Always try to install the Python dependencies they are cheap. -$PYAV_PIP install --upgrade -r tests/requirements.txt 2> /dev/null - # Skip the rest of the build if it already exists. if [[ -e "$PYAV_LIBRARY_PREFIX/bin/ffmpeg" ]]; then echo "We have a cached build of ffmpeg-$PYAV_LIBRARY; skipping re-build." diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index 2907b9e22..000000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -cython -numpy -pillow -black -isort -flake8 -flake8-pyproject -pytest -sphinx==5.1.0 -mypy==1.10.0