Skip to content

Commit

Permalink
Update Makefile target prerequisites
Browse files Browse the repository at this point in the history
- Introduce new `check-ffmpeg` Makefile target to verify `ffmpeg` presence
- Refactor Makefile to use `check-ffmpeg` as a prerequisite for key build targets
  • Loading branch information
johnnyhuy committed Apr 4, 2024
1 parent 3abd4b6 commit 5888fec
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
VENV := . venv/bin/activate &&


check-ffmpeg:
ifeq (, $(shell which ffmpeg))
$(error "No ffmpeg in PATH, please install ffmpeg")
else
@echo "ffmpeg is installed"
endif

freeze:
$(VENV) pip freeze > requirements.txt

install:
ifeq (, $(shell which ffmpeg))
$(error "No ffmpeg in PATH, please install ffmpeg")
endif
ifneq (, $(shell which asdf))
asdf install
endif
python3 -m venv venv
$(VENV) pip install -r requirements.txt

install-cli:
install-cli: check-ffmpeg
pip install .

test:
python -m unittest discover -s tests

transcribe: install
transcribe: install check-ffmpeg
$(VENV) python transcribe_me/main.py

transcribe-install: install
transcribe-install: install check-ffmpeg
$(VENV) python transcribe_me/main.py install

0 comments on commit 5888fec

Please sign in to comment.