Skip to content

Commit b8b9615

Browse files
authored
Make sed pattern for SYS_PIP portable across macOS and Linux (#4163)
- Updated sed pattern in Makefile.vars to use [0-9][0-9]* for Python version matching. - Ensures correct detection of pip executable for all supported Python versions on both GNU and BSD sed.
1 parent 5d8c359 commit b8b9615

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Makefile.vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ BLD_DIR_BIN := $(BLD_DIR_ENV)/bin
7777
# Sets up per-version BLD_DIR_ENV and INST_DIR_ENV variables.
7878
# Introduces version-specific requirement file generation via generate_requirements.py.
7979
SYS_PYTHON := $(shell IFS=:; for p in $$PATH; do if [ -x "$$p/$(PYTHON_VER)" ]; then echo "$$p/$(PYTHON_VER)"; break; fi; done)
80-
SYS_PIP := $(shell echo $(SYS_PYTHON) | sed "s/python\([0-9]\+\.[0-9]\+\)$$/pip\1/")
80+
SYS_PIP := $(shell echo $(SYS_PYTHON) | sed "s/python\([0-9][0-9]*\.[0-9][0-9]*\)$$/pip\1/")
8181
ENV_PYTHON := $(shell echo $(BLD_DIR_BIN)/$(shell basename $(SYS_PYTHON)))
8282
ENV_PIP := $(shell echo $(BLD_DIR_BIN)/$(shell basename $(SYS_PIP)))
8383
PYTHON_INCLUDE_DIR := $(shell $(SYS_PYTHON) -c "import sysconfig; print(sysconfig.get_path('include'))" 2>/dev/null)

desktop/core/generate_requirements.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def __init__(self):
200200
"ppc64le": self.ppc64le_requirements,
201201
"x86_64": self.x86_64_requirements,
202202
"aarch64": self.aarch64_requirements,
203+
"arm64": self.aarch64_requirements, # arm64 is treated as aarch64
203204
}
204205
self.arch = platform.machine()
205206
self.python_version_string = f"{sys.version_info.major}.{sys.version_info.minor}"

0 commit comments

Comments
 (0)