File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,11 +31,17 @@ def run(self):
3131 sys .stderr .write ("This is expected on Windows. To build cpu-benchmark, install make and g++.\n " )
3232 super ().run ()
3333
34- # Conditionally include cpu-benchmark if it exists
34+ # Conditionally include cpu-benchmark based on platform
3535data_files = []
36- cpu_benchmark_path = 'bin/cpu-benchmark'
37- if os .path .exists (cpu_benchmark_path ):
38- data_files .append (('bin' , [cpu_benchmark_path ]))
36+ if sys .platform != 'win32' :
37+ # On Unix-like systems (Linux, macOS, Docker), always try to include it
38+ # The Build class will create it during the build process
39+ data_files .append (('bin' , ['bin/cpu-benchmark' ]))
40+ else :
41+ # On Windows, only include if it exists (e.g., if user manually compiled it)
42+ cpu_benchmark_path = 'bin/cpu-benchmark'
43+ if os .path .exists (cpu_benchmark_path ):
44+ data_files .append (('bin' , [cpu_benchmark_path ]))
3945
4046setup (
4147 packages = find_packages (),
You can’t perform that action at this time.
0 commit comments