mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +00:00
Use virtualenv in Makefile for python dependencies (#1619)
* Use virtualenv in Makefile for python dependencies * Create separate targets for venv creation and installation * Fix install-python-deps prerequisite * Try simplifying Jenkinsfile * Simplify venv targets * Fix merge * Update README.md Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
584e61a849
commit
5dd19e4862
4 changed files with 40 additions and 50 deletions
15
Makefile
15
Makefile
|
@ -55,6 +55,7 @@ endif
|
|||
|
||||
PROJECT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
BUILD_DIR := build/$(VERSION)
|
||||
VENV := .venv
|
||||
|
||||
MAKE = make
|
||||
CFLAGS += -DOOT_DEBUG
|
||||
|
@ -120,7 +121,7 @@ MKDMADATA := tools/mkdmadata
|
|||
ELF2ROM := tools/elf2rom
|
||||
ZAPD := tools/ZAPD/ZAPD.out
|
||||
FADO := tools/fado/fado.elf
|
||||
PYTHON ?= python3
|
||||
PYTHON ?= $(VENV)/bin/python3
|
||||
|
||||
# Command to replace path variables in the spec file. We can't use the C
|
||||
# preprocessor for this because it won't substitute inside string literals.
|
||||
|
@ -262,6 +263,8 @@ endif
|
|||
|
||||
#### Main Targets ###
|
||||
|
||||
all: rom compress
|
||||
|
||||
rom: $(ROM)
|
||||
ifneq ($(COMPARE),0)
|
||||
@md5sum $(ROM)
|
||||
|
@ -287,7 +290,12 @@ distclean: clean assetclean
|
|||
$(RM) -r baseroms/$(VERSION)/segments
|
||||
$(MAKE) -C tools distclean
|
||||
|
||||
setup:
|
||||
venv:
|
||||
test -d $(VENV) || python3 -m venv $(VENV)
|
||||
$(PYTHON) -m pip install -U pip
|
||||
$(PYTHON) -m pip install -U -r requirements.txt
|
||||
|
||||
setup: venv
|
||||
$(MAKE) -C tools
|
||||
$(PYTHON) tools/decompress_baserom.py $(VERSION)
|
||||
$(PYTHON) extract_baserom.py
|
||||
|
@ -300,9 +308,8 @@ endif
|
|||
$(N64_EMULATOR) $<
|
||||
|
||||
|
||||
.PHONY: all rom compress clean setup run distclean assetclean
|
||||
.PHONY: all rom compress clean assetclean distclean venv setup run
|
||||
.DEFAULT_GOAL := rom
|
||||
all: rom compress
|
||||
|
||||
#### Various Recipes ####
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue