From e5d32e7a0d6acd69dcae187993efa7f3f97ed00e Mon Sep 17 00:00:00 2001 From: moran Date: Tue, 18 Nov 2025 17:23:45 +0800 Subject: [PATCH] test --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a326a94..65d5736 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ import sys import shutil import multiprocessing import subprocess +import shlex from typing import List from pathlib import Path from setuptools import find_packages, setup @@ -320,7 +321,7 @@ class CustomBuildExt(build_ext): """Run CMake configuration and build commands.""" # Combine all cmake commands into one string cmake_cmd = ( - f"source {self.env_script_path} && " + f"source {shlex.quote(self.env_script_path)} && " f"cmake -S ./ -B {self.build_ops_dir}" f" -DCMAKE_BUILD_TYPE={self.build_type}" f" -DCMAKE_INSTALL_PREFIX={os.path.join(self.build_ops_dir, 'install')}" @@ -328,7 +329,7 @@ class CustomBuildExt(build_ext): f" -DBUILD_EXTENSION_DIR={self.build_extension_dir}" f" -DASCENDC_INSTALL_PATH={self.package_path}" f" -DMS_EXTENSION_NAME={self.ext_name}" - f" -DASCEND_CANN_PACKAGE_PATH={self.ascend_home_path} && " + f" -DASCEND_CANN_PACKAGE_PATH={shlex.quote(self.ascend_home_path)} && " f"cmake --build {self.build_ops_dir} -j{self.compile_cores}" ) -- Gitee