Permalink
Browse files

Add another place to check for configuration, namely ~/.numpy-site.cf…

…g, 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.
  • Loading branch information...
1 parent e7172c9 commit f13e90581906086b97f2df480f513a2f3f779354 @rkern rkern committed Apr 15, 2007
Showing with 7 additions and 2 deletions.
  1. +4 −2 numpy/distutils/system_info.py
  2. +3 −0 site.cfg.example
@@ -58,7 +58,7 @@
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 @@ def __init__ (self,
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')
View
@@ -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

0 comments on commit f13e905

Please sign in to comment.