| 1 |
LDFLAGS ?= "" |
| 2 |
CFLAGS ?= "-O0 -Wno-incompatible-pointer-types -Wno-unreachable-code" |
| 3 |
|
| 4 |
PYAV_PYTHON ?= python |
| 5 |
PYAV_PIP ?= pip |
| 6 |
PYTHON := $(PYAV_PYTHON) |
| 7 |
PIP := $(PYAV_PIP) |
| 8 |
|
| 9 |
|
| 10 |
.PHONY: default build clean fate-suite lint test |
| 11 |
|
| 12 |
default: build |
| 13 |
|
| 14 |
|
| 15 |
build: |
| 16 |
$(PIP) install -U --pre cython setuptools |
| 17 |
CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) $(PYTHON) setup.py build_ext --inplace --debug |
| 18 |
|
| 19 |
clean: |
| 20 |
- find av -name '*.so' -delete |
| 21 |
- rm -rf build |
| 22 |
- rm -rf sandbox |
| 23 |
- rm -rf src |
| 24 |
- make -C docs clean |
| 25 |
|
| 26 |
fate-suite: |
| 27 |
# Grab ALL of the samples from the ffmpeg site. |
| 28 |
mkdir -p tests/assets/fate-suite/ |
| 29 |
rsync -vrltLW rsync://fate-suite.ffmpeg.org/fate-suite/ tests/assets/fate-suite/ |
| 30 |
|
| 31 |
lint: |
| 32 |
$(PIP) install -U ruff isort pillow numpy mypy==2.1.0 pytest |
| 33 |
ruff format --check av examples tests setup.py |
| 34 |
isort --check-only --diff av examples tests |
| 35 |
mypy av tests |
| 36 |
|
| 37 |
test: |
| 38 |
$(PIP) install --upgrade cython numpy pillow pytest |
| 39 |
$(PYTHON) -m pytest |