4747def generate_build_config (skip_cuda_build ):
4848 """Generate build-time configuration file."""
4949 config_template_path = (
50- current_file_path / "transformer_engine" / "plugin" /
51- "core" / "_build_config.py.template"
50+ current_file_path / "transformer_engine" / "plugin" / "core" / "_build_config.py.template"
5251 )
5352 config_output_path = (
54- current_file_path / "transformer_engine" / "plugin" /
55- "core" / "_build_config.py"
53+ current_file_path / "transformer_engine" / "plugin" / "core" / "_build_config.py"
5654 )
5755
5856 if config_template_path .exists ():
59- with open (config_template_path , 'r' ) as f :
57+ with open (config_template_path , "r" ) as f :
6058 template = f .read ()
6159
6260 config_content = template .format (
@@ -65,7 +63,7 @@ def generate_build_config(skip_cuda_build):
6563 platform = platform .platform (),
6664 )
6765
68- with open (config_output_path , 'w' ) as f :
66+ with open (config_output_path , "w" ) as f :
6967 f .write (config_content )
7068
7169 print (f"Generated build config: { config_output_path } " )
@@ -77,7 +75,7 @@ def generate_build_config(skip_cuda_build):
7775BUILD_TIME = "{ datetime .now ().isoformat ()} "
7876BUILD_PLATFORM = "{ platform .platform ()} "
7977"""
80- with open (config_output_path , 'w' ) as f :
78+ with open (config_output_path , "w" ) as f :
8179 f .write (config_content )
8280 print (f"Generated minimal build config: { config_output_path } " )
8381
@@ -86,7 +84,7 @@ class CustomInstall(InstallCommand):
8684 """Custom install command to generate build config."""
8785
8886 user_options = InstallCommand .user_options + [
89- (' skip-cuda-build' , None , ' Skip CUDA build' ),
87+ (" skip-cuda-build" , None , " Skip CUDA build" ),
9088 ]
9189
9290 def initialize_options (self ):
0 commit comments