Skip to content

Commit

Permalink
Put pip installs in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Aug 1, 2024
1 parent b68ec33 commit a515894
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
4 changes: 4 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions scripts/build-deps
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
10 changes: 0 additions & 10 deletions tests/requirements.txt

This file was deleted.

0 comments on commit a515894

Please sign in to comment.