|
31 | 31 |
|
32 | 32 | IS_CONDA_BUILD = os.environ.get("CONDA_BUILD") == "1"
|
33 | 33 |
|
34 |
| -IS_WIN = False |
35 |
| -IS_MAC = False |
36 |
| -IS_LIN = False |
37 |
| - |
38 |
| -if 'linux' in sys.platform: |
39 |
| - IS_LIN = True |
40 |
| -elif sys.platform == 'darwin': |
41 |
| - IS_MAC = True |
42 |
| -elif sys.platform in ['win32', 'cygwin']: |
43 |
| - IS_WIN = True |
44 |
| -else: |
45 |
| - raise EnvironmentError(f"Intel NumPy: {sys.platform} not supported") |
46 |
| - |
47 | 34 |
|
48 | 35 | def find_library(var_name, rel_header_paths, rel_lib_paths,
|
49 | 36 | rel_include_path="include", rel_libdir_path="lib", verbose=False):
|
@@ -106,10 +93,10 @@ def _find_cmplr_in_dpcpp_root(verbose=False):
|
106 | 93 | """
|
107 | 94 | rel_header_paths = rel_lib_paths = []
|
108 | 95 |
|
109 |
| - if IS_LIN: |
| 96 | + if 'linux' in sys.platform: |
110 | 97 | rel_include_path = os.path.join('linux', 'include')
|
111 | 98 | rel_libdir_path = os.path.join('linux', 'lib')
|
112 |
| - elif IS_WIN: |
| 99 | + elif sys.platform in ['win32', 'cygwin']: |
113 | 100 | rel_include_path = os.path.join('windows', 'include')
|
114 | 101 | rel_libdir_path = os.path.join('windows', 'lib')
|
115 | 102 | else:
|
@@ -225,10 +212,10 @@ def _find_omp_in_dpcpp_root(verbose=False):
|
225 | 212 | """
|
226 | 213 | rel_header_paths = rel_lib_paths = []
|
227 | 214 |
|
228 |
| - if IS_LIN: |
| 215 | + if 'linux' in sys.platform: |
229 | 216 | rel_include_path = os.path.join('linux', 'compiler', 'include')
|
230 | 217 | rel_libdir_path = os.path.join('linux', 'compiler', 'lib', 'intel64')
|
231 |
| - elif IS_WIN: |
| 218 | + elif sys.platform in ['win32', 'cygwin']: |
232 | 219 | rel_include_path = os.path.join('windows', 'compiler', 'include')
|
233 | 220 | rel_libdir_path = os.path.join('windows', 'compiler', 'lib', 'intel64_win')
|
234 | 221 | else:
|
|
0 commit comments