apeforest commented on a change in pull request #13359: [MXNET-1110] find the
path to include header files
URL: https://github.com/apache/incubator-mxnet/pull/13359#discussion_r236449338
##########
File path: python/mxnet/libinfo.py
##########
@@ -76,6 +76,33 @@ def find_lib_path():
os.environ['PATH'] = os.environ['PATH'] + ';' +
os.path.dirname(lib_path[0])
return lib_path
+def find_include_path():
+ """Find MXNet dynamic library files.
+ Returns
+ -------
+ incl_path : string
+ Path to the header files.
+ """
+ incl_from_env = os.environ.get('MXNET_INCLUDE_PATH')
+ if incl_from_env:
+ if os.path.isfile(incl_from_env):
+ if not os.path.isabs(incl_from_env):
+ logging.warning("MXNET_INCLUDE_PATH should be an absolute
path, instead of: %s",
+ incl_from_env)
+ else:
+ if os.name == 'nt':
+ os.environ['PATH'] = os.environ['PATH'] + ';' +
os.path.dirname(incl_from_env)
+ return [incl_from_env]
+ else:
+ logging.warning("MXNET_INCLUDE_PATH '%s' doesn't exist",
incl_from_env)
+ curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
+ incl_path = os.path.join(curr_path, '../../include/')
Review comment:
We discussed offline and found this follows the same pattern in
find_lib_path()
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services