mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 07:22:12 -05:00
Fix autopep8 reference for "make format" on Linux
This commit is contained in:
parent
0fb89c2301
commit
cd0967d3e1
1 changed files with 10 additions and 2 deletions
12
GNUmakefile
12
GNUmakefile
|
@ -204,11 +204,19 @@ ifndef PYTHON
|
|||
PYTHON:=python3
|
||||
endif
|
||||
|
||||
# The Python version bundled in `LIBDIR`,
|
||||
# needed when macOS & Linux are out of sync while upgrading the Python version.
|
||||
ifeq ($(OS_NCASE),darwin)
|
||||
PY_LIB_VERSION:=3.10
|
||||
else
|
||||
PY_LIB_VERSION:=3.11
|
||||
endif
|
||||
|
||||
# For macOS python3 is not installed by default, so fallback to python binary
|
||||
# in libraries, or python 2 for running make update to get it.
|
||||
ifeq ($(OS_NCASE),darwin)
|
||||
ifeq (, $(shell command -v $(PYTHON)))
|
||||
PYTHON:=$(DEPS_INSTALL_DIR)/python/bin/python3.10
|
||||
PYTHON:=$(DEPS_INSTALL_DIR)/python/bin/python$(PY_LIB_VERSION)
|
||||
ifeq (, $(shell command -v $(PYTHON)))
|
||||
PYTHON:=python
|
||||
endif
|
||||
|
@ -228,7 +236,7 @@ endif
|
|||
# Otherwise the "autopep8" command can be used.
|
||||
ifndef AUTOPEP8
|
||||
ifneq (, $(LIBDIR))
|
||||
AUTOPEP8:=$(wildcard $(LIBDIR)/python/lib/python3.10/site-packages/autopep8.py)
|
||||
AUTOPEP8:=$(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION)/site-packages/autopep8.py)
|
||||
endif
|
||||
ifeq (, $(AUTOPEP8))
|
||||
AUTOPEP8:=autopep8
|
||||
|
|
Loading…
Reference in a new issue