|
16 | 16 | from setuptools.command.build_ext import build_ext |
17 | 17 |
|
18 | 18 | class Build(build_ext): |
19 | | - """Customized setuptools build command - builds cpu-benchmark on build.""" |
| 19 | + """Customized setuptools build command""" |
20 | 20 |
|
21 | 21 | def run(self): |
22 | | - # Try to build the cpu-benchmark, but make it optional |
23 | | - # This allows installation on Windows where make/g++ may not be available |
24 | | - try: |
25 | | - result = subprocess.call(["make"], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL) |
26 | | - if result != 0: |
27 | | - sys.stderr.write("Warning: 'make' build failed. cpu-benchmark will not be available.\n") |
28 | | - sys.stderr.write("This is expected on Windows. To build cpu-benchmark, install make and g++.\n") |
29 | | - except (FileNotFoundError, OSError): |
30 | | - sys.stderr.write("Warning: 'make' is not installed. cpu-benchmark will not be available.\n") |
31 | | - sys.stderr.write("This is expected on Windows. To build cpu-benchmark, install make and g++.\n") |
32 | | - super().run() |
| 22 | + pass |
| 23 | + # OLD CODE TO build a C++ executable |
| 24 | + # # This allows installation on Windows where make/g++ may not be available |
| 25 | + # try: |
| 26 | + # result = subprocess.call(["make"], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL) |
| 27 | + # if result != 0: |
| 28 | + # sys.stderr.write("Warning: 'make' build failed. cpu-benchmark will not be available.\n") |
| 29 | + # sys.stderr.write("This is expected on Windows. To build cpu-benchmark, install make and g++.\n") |
| 30 | + # except (FileNotFoundError, OSError): |
| 31 | + # sys.stderr.write("Warning: 'make' is not installed. cpu-benchmark will not be available.\n") |
| 32 | + # sys.stderr.write("This is expected on Windows. To build cpu-benchmark, install make and g++.\n") |
| 33 | + # super().run() |
33 | 34 |
|
34 | 35 | # Conditionally include cpu-benchmark based on platform |
35 | 36 | data_files = [] |
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])) |
| 37 | +# if sys.platform != 'win32': |
| 38 | +# # On Unix-like systems (Linux, macOS, Docker), always try to include it |
| 39 | +# # The Build class will create it during the build process |
| 40 | +# data_files.append(('bin', ['bin/cpu-benchmark'])) |
| 41 | +# else: |
| 42 | +# # On Windows, only include if it exists (e.g., if user manually compiled it) |
| 43 | +# cpu_benchmark_path = 'bin/cpu-benchmark' |
| 44 | +# if os.path.exists(cpu_benchmark_path): |
| 45 | +# data_files.append(('bin', [cpu_benchmark_path])) |
45 | 46 |
|
46 | 47 | setup( |
47 | 48 | packages=find_packages(), |
|
0 commit comments