-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #625 from evalf/simplify
Simplify
- Loading branch information
Showing
14 changed files
with
737 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from .. import log | ||
import sys, site, os | ||
|
||
libsubdir = 'lib' | ||
prefixes = list(site.PREFIXES) | ||
if hasattr(site, 'getuserbase'): | ||
prefixes.append(site.getuserbase()) | ||
for prefix in prefixes: | ||
libdir = os.path.join(prefix, libsubdir) | ||
if not os.path.exists(os.path.join(libdir, 'libmkl_rt.so.1')): | ||
continue | ||
log.set_output('libdir', libdir) | ||
break | ||
else: | ||
log.error('cannot find {} in any of the following dirs: {}'.format('libmkl_rt.so.1', ' '.join(prefixes))) | ||
|
||
lib = os.path.join(libdir, 'libmkl_rt.so') | ||
if not os.path.exists(lib): | ||
os.symlink('libmkl_rt.so.1', lib) | ||
|
||
github_env = os.environ.get('GITHUB_ENV') | ||
assert github_env | ||
ld_library_path = ':'.join(filter(None, (os.environ.get('LD_LIBRARY_PATH', ''), libdir))) | ||
with open(github_env, 'a') as f: | ||
print('LD_LIBRARY_PATH={}'.format(ld_library_path), file=f) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.