summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kern <robert.kern@gmail.com>2007-04-15 04:46:07 +0000
committerRobert Kern <robert.kern@gmail.com>2007-04-15 04:46:07 +0000
commitf13e90581906086b97f2df480f513a2f3f779354 (patch)
tree115c00735c8840f2d5b130e3d6914d81806c521c
parente7172c9ba8240ef8c66d872143079f2165620a48 (diff)
downloadnumpy-f13e90581906086b97f2df480f513a2f3f779354.tar.gz
Add another place to check for configuration, namely ~/.numpy-site.cfg, to help automatic installation where one can't edit the source checkout. I've added the alternate name to make it hidden because that's just considerate.
-rw-r--r--numpy/distutils/system_info.py6
-rw-r--r--site.cfg.example3
2 files changed, 7 insertions, 2 deletions
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index 4f472b93a..c94fb607d 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -58,7 +58,7 @@ Global parameters:
The file 'site.cfg' is looked for in
1) Directory of main setup.py file being run.
-2) Home directory of user running the setup.py file (Not implemented yet)
+2) Home directory of user running the setup.py file as ~/.numpy-site.cfg
3) System wide directory (location of this file...)
The first one found is used to get system configuration options The
@@ -349,7 +349,9 @@ class system_info:
defaults['src_dirs'] = os.pathsep.join(default_src_dirs)
defaults['search_static_first'] = str(self.search_static_first)
self.cp = ConfigParser.ConfigParser(defaults)
- self.files = get_standard_file('site.cfg')
+ self.files = []
+ self.files.extend(get_standard_file('.numpy-site.cfg'))
+ self.files.extend(get_standard_file('site.cfg'))
self.parse_config_files()
self.search_static_first = self.cp.getboolean(self.section,
'search_static_first')
diff --git a/site.cfg.example b/site.cfg.example
index 437bb8b1b..461fdf4e2 100644
--- a/site.cfg.example
+++ b/site.cfg.example
@@ -4,6 +4,9 @@
# packages will use all sections so you should leave out sections that your
# package does not use.
+# To assist automatic installation like easy_install, the user's home directory
+# will also be checked for the file ~/.numpy-site.cfg .
+
# The format of the file is that of the standard library's ConfigParser module.
#
# http://www.python.org/doc/current/lib/module-ConfigParser.html