summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorAlessio Sergi <al3hex@gmail.com>2015-04-16 12:36:16 +0200
committerAlessio Sergi <al3hex@gmail.com>2015-04-16 15:28:52 +0200
commit43183615175d44cd9f05a05a24f6297f3853f29b (patch)
tree2e41a76ae0ff58efc1a5dd8c354e1c0149e107c5 /setup.py
parent9a8792459663d1a95560df7ea953667fd84faa21 (diff)
No more system-wide configuration file by default
Support remains there, but no system-wide configuration file will be provided anymore. Default configuration settings are initialized by code which may be overridden by a configuration file.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/setup.py b/setup.py
index 72daabda..d41078f9 100755
--- a/setup.py
+++ b/setup.py
@@ -6,12 +6,12 @@ import sys
from setuptools import setup
-is_chroot = os.stat('/').st_ino != 2
if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 3):
print('Glances requires at least Python 2.6 or 3.3 to run.')
sys.exit(1)
+
def get_data_files():
data_files = [
('share/doc/glances', ['AUTHORS', 'COPYING', 'NEWS', 'README.rst',
@@ -20,25 +20,8 @@ def get_data_files():
('share/man/man1', ['man/glances.1'])
]
- if hasattr(sys, 'real_prefix'): # virtualenv
- conf_path = os.path.join(sys.prefix, 'etc', 'glances')
- elif os.name == 'posix' and (os.getuid() == 0 or is_chroot):
- # Unix-like + root privileges/chroot environment
- if 'bsd' in sys.platform:
- conf_path = os.path.join(sys.prefix, 'etc', 'glances')
- elif 'linux' in sys.platform:
- conf_path = os.path.join('/etc', 'glances')
- elif 'darwin' in sys.platform:
- conf_path = os.path.join('/usr/local', 'etc', 'glances')
- elif 'win32' in sys.platform: # windows
- conf_path = os.path.join(os.environ.get('APPDATA'), 'glances')
- else: # Unix-like + per-user install
- conf_path = os.path.join('etc', 'glances')
- data_files.append((conf_path, ['conf/glances.conf']))
-
for mo in glob.glob('i18n/*/LC_MESSAGES/*.mo'):
- data_files.append(
- (os.path.dirname(mo).replace('i18n/', 'share/locale/'), [mo]))
+ data_files.append((os.path.dirname(mo).replace('i18n/', 'share/locale/'), [mo]))
return data_files