summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorEd Bartosh <eduard.bartosh@intel.com>2013-08-11 18:17:34 +0300
committerEduard Bartosh <eduard.bartosh@intel.com>2013-08-12 23:56:11 -0700
commite5ce4ed3104f84fecae02e3867d80a7d79fe6010 (patch)
treedc37107a64f0cefcf0b33e995d39cf235e703d1f /setup.py
parent23e81434023fd632dcd5d5f15d2c8f40da531b6f (diff)
downloadrepa-e5ce4ed3104f84fecae02e3867d80a7d79fe6010.tar.gz
repa-e5ce4ed3104f84fecae02e3867d80a7d79fe6010.tar.bz2
repa-e5ce4ed3104f84fecae02e3867d80a7d79fe6010.zip
Implemented config file processing
Configuration is taken from /etc/repa.conf and ~/.repa.conf, so it's possible to specify system defaults in /etc/repa.conf and user-related configuration options in ~/.repa.conf. ~/.repa.conf has higher priority and any option from /etc/repa.conf can be reset in ~/.repa.conf Configuration processing is implemented in a way that default values for command line parameters are taken from configuration file(s). Configuration section to use can be specified in command line too. Fixes: #1141 Change-Id: I632f22674c282021983bc6a496ef1fccc0da3137 Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Reviewed-on: https://otctools.jf.intel.com/review/5839 Tested-by: OTC Tools Tester <ed.bartosh@linux.intel.com> Reviewed-by: Hasan Wan <hasan.wan@intel.com>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 6c38f90..a1f5e0f 100644
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ Author: Ed Bartosh <eduard.bartosh@intel.com>
Setup module
"""
-
+import os
from setuptools import setup
setup(name = "repa",
@@ -18,10 +18,12 @@ setup(name = "repa",
author_email = 'eduard.bartosh@intel.com',
packages = ['repa'],
namespace_packages = ['repa'],
- data_files = [('share/doc/packages/repa/', ['README']),],
+ data_files = [
+ ('share/doc/packages/repa/', ['README']),
+ (['/etc', 'etc'][bool(os.getenv('VIRTUAL_ENV'))], ['repa.conf'])],
entry_points = {
'console_scripts': ['repa = repa.main:main'],
- 'repa_commands': ['list = repa.list:List',
- 'group = repa.group:Group']
+ 'repa_commands': ['list = repa.list:List',
+ 'group = repa.group:Group']
}
)