Add python setup script
Save script in /usr/sbin/ and data file in
/usr/share/obmc-phosphor-settings/.
Closes openbmc/phosphor-settingsd#9
Change-Id: I1ac67e88dab5904c3d2a96707db0b510a608a8c2
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/settings_manager.py b/settings_manager.py
index 67f3260..864ee9d 100644
--- a/settings_manager.py
+++ b/settings_manager.py
@@ -6,7 +6,11 @@
import dbus.mainloop.glib
import os
import os.path as path
+import sys
from obmc.dbuslib.bindings import DbusProperties, get_dbus
+
+settings_file_path = os.path.join(sys.prefix, 'share/obmc-phosphor-settings')
+sys.path.insert(1, settings_file_path)
import settings_file as s
DBUS_NAME = 'org.openbmc.settings.Host'
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..ed3bf6e
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,2 @@
+[install]
+install_scripts=/usr/sbin
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..12b5151
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,7 @@
+from distutils.core import setup
+
+setup(name='obmc-phosphor-settings',
+ version='1.0',
+ scripts=['settings_manager.py'],
+ data_files=[('obmc-phosphor-settings', ['settings_file.py'])],
+ )