summaryrefslogtreecommitdiff
path: root/numpy/distutils/misc_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/distutils/misc_util.py')
-rw-r--r--numpy/distutils/misc_util.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
index 30d72f50e..3221e4da3 100644
--- a/numpy/distutils/misc_util.py
+++ b/numpy/distutils/misc_util.py
@@ -33,6 +33,13 @@ def clean_up_temporary_directory():
atexit.register(clean_up_temporary_directory)
+# stores the order in which the libraries were added
+_ldata = []
+def get_library_names():
+ """Get the library names in order"""
+ global _ldata
+
+ return _ldata
from numpy.distutils.compat import get_exception
from numpy.compat import basestring
@@ -1558,6 +1565,10 @@ class Configuration(object):
name = name #+ '__OF__' + self.name
build_info['sources'] = sources
+ global _ldata
+ # Track the library order
+ _ldata += [name]
+
# Sometimes, depends is not set up to an empty list by default, and if
# depends is not given to add_library, distutils barfs (#1134)
if not 'depends' in build_info:
@@ -2283,6 +2294,16 @@ def generate_config_py(target):
f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0])))
f.write('# It contains system_info results at the time of building this package.\n')
f.write('__all__ = ["get_info","show"]\n\n')
+
+ if system_info.shared_libs:
+ f.write("""
+
+import os
+
+os.environ["PATH"] += os.pathsep + os.path.join(os.path.dirname(__file__), '_lib')
+
+""")
+
for k, i in system_info.saved_results.items():
f.write('%s=%r\n' % (k, i))
f.write(r'''