Fix setup.py

This commit is contained in:
asergi 2013-01-12 20:02:00 +01:00
parent bfbc1b7609
commit 28c893a878
2 changed files with 28 additions and 25 deletions

View File

@ -182,7 +182,8 @@ else:
csv_lib_tag = True
# Define the default configuration file
default_conf_file = "/etc/glances.conf"
DEFAULT_CONF_FILE = "/etc/glances/glances.conf"
# Classes
#========
@ -228,7 +229,7 @@ class glancesLimits:
'PROCESS_CPU': [50, 70, 90],
'PROCESS_MEM': [50, 70, 90]}
def __init__(self, conf_file = default_conf_file):
def __init__(self, conf_file=DEFAULT_CONF_FILE):
# Open the configuration file
config = ConfigParser.RawConfigParser()
if (config.read(conf_file) != []):
@ -3297,7 +3298,7 @@ def printSyntax():
print(_("\t-B @IP|host\tBind server to the given IP or host NAME"))
print(_("\t-c @IP|host\tConnect to a Glances server"))
print(_("\t-C file\t\tPath to the configuration file (default: %s)") %
default_conf_file)
DEFAULT_CONF_FILE)
print(_("\t-d\t\tDisable disk I/O module"))
print(_("\t-e\t\tEnable the sensors module (Linux-only)"))
print(_("\t-f file\t\tSet the output folder (HTML) or file (CSV)"))
@ -3362,7 +3363,7 @@ def main():
server_tag = False
# Default configuration file (if exist)
conf_file = default_conf_file
conf_file = DEFAULT_CONF_FILE
# Set the default refresh time
refresh_time = 3

View File

@ -12,10 +12,10 @@ data_files = [
'COPYING',
'AUTHORS',
'NEWS',
'screenshot.png']),
'screenshot.png',
'glances/conf/glances.conf']),
('share/doc/glances/doc', glob('doc/*.png')),
('/etc', ['glances/conf/glances.conf']),
('share/glances/conf-default', ['glances/conf/glances.conf']),
('etc/glances', ['glances/conf/glances.conf']),
('share/glances/html', glob('glances/html/*.html')),
('share/glances/css', glob('glances/css/*.css')),
('share/glances/img', glob('glances/img/*.png')),
@ -24,22 +24,24 @@ data_files = [
for mo in glob('i18n/*/LC_MESSAGES/*.mo'):
data_files.append((dirname(mo).replace('i18n/', 'share/locale/'), [mo]))
setup(name='Glances',
version='1.6b',
download_url='https://s3.amazonaws.com/glances/glances-1.6b.tar.gz',
url='https://github.com/nicolargo/glances',
description='CLI curses-based monitoring tool',
author='Nicolas Hennion',
author_email='nicolas@nicolargo.com',
license="LGPL",
keywords="cli curses monitoring system",
long_description=open('README').read(),
install_requires=['psutil>=0.4.1'],
packages=['glances'],
extras_require = {
'HTML': ['jinja2>=2.0'],
'SENSORS': ['pysensors>=0.0.2'],},
include_package_data=True,
data_files=data_files,
entry_points={"console_scripts": ["glances = glances.glances:main"]},
setup(
name='Glances',
version='1.6b',
download_url='https://s3.amazonaws.com/glances/glances-1.6b.tar.gz',
url='https://github.com/nicolargo/glances',
description='CLI curses-based monitoring tool',
author='Nicolas Hennion',
author_email='nicolas@nicolargo.com',
license="LGPL",
keywords="cli curses monitoring system",
long_description=open('README').read(),
install_requires=['psutil>=0.4.1'],
packages=['glances'],
extras_require={
'HTML': ['jinja2>=2.0'],
'SENSORS': ['pysensors>=0.0.2'],
},
include_package_data=True,
data_files=data_files,
entry_points={"console_scripts": ["glances=glances.glances:main"]},
)