diff options
author | Alessio Sergi <al3hex@gmail.com> | 2013-08-05 01:25:05 +0200 |
---|---|---|
committer | Alessio Sergi <al3hex@gmail.com> | 2013-08-05 01:25:05 +0200 |
commit | f1c76b40c9e6d9f1802997646f16e0083eeba6d9 (patch) | |
tree | 1f9bf0e4b4b40b9a0ff241e72d02e6a8961d4604 /setup.py | |
parent | 2465c9c648d147837bdae9d72728f2a29bdd1174 (diff) |
Fix bugs on OS X
Long story short: on OS X, sys.prefix actually pointing to
/System/Library/Frameworks/Python.framework/foo, not /usr/local (which
is the default path where Glances is installed using pip or brew).
Using a self-made implementation of sys.prefix, called sys_prefix, fix
the problem.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -17,10 +17,12 @@ data_files = [ ('share/man/man1', ['docs/man/glances.1']) ] -if hasattr(sys, 'real_prefix') or (sys.platform in ('bsd', 'darwin')): +if hasattr(sys, 'real_prefix') or 'bsd' in sys.platform: etc_path = os.path.join(sys.prefix, 'etc', 'glances') if not hasattr(sys, 'real_prefix') and 'linux' in sys.platform: etc_path = os.path.join('/etc', 'glances') +elif 'darwin' in sys.platform: + etc_path = os.path.join('/usr/local', 'etc', 'glances') data_files.append((etc_path, ['glances/conf/glances.conf'])) for mo in glob.glob('i18n/*/LC_MESSAGES/*.mo'): |