فهرست منبع

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.
Ayush Goyal 10 ماه پیش
والد
کامیت
b8b96158fa
2فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 1 1
      Makefile.vars
  2. 1 0
      desktop/core/generate_requirements.py

+ 1 - 1
Makefile.vars

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

+ 1 - 0
desktop/core/generate_requirements.py

@@ -200,6 +200,7 @@ class RequirementsGenerator:
       "ppc64le": self.ppc64le_requirements,
       "x86_64": self.x86_64_requirements,
       "aarch64": self.aarch64_requirements,
+      "arm64": self.aarch64_requirements,  # arm64 is treated as aarch64
     }
     self.arch = platform.machine()
     self.python_version_string = f"{sys.version_info.major}.{sys.version_info.minor}"