add setup.cfg to specify prefix
authorGui Chen <gui.chen@intel.com>
Wed, 2 May 2012 08:38:25 +0000 (16:38 +0800)
committerGui Chen <gui.chen@intel.com>
Wed, 2 May 2012 08:58:21 +0000 (16:58 +0800)
and use sys.prefix as default prefix dir in setup.py

Signed-off-by: Gui Chen <gui.chen@intel.com>
setup.cfg [new file with mode: 0644]
setup.py

diff --git a/setup.cfg b/setup.cfg
new file mode 100644 (file)
index 0000000..fe98c34
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,2 @@
+[install]
+prefix=$PREFIX
index 1056554..f68c1c0 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -88,6 +88,7 @@ with file(conffile, 'w') as wf:
     wf.write(conf_str)
 
 try:
+    os.environ['PREFIX'] = prefix
     setup(name=MOD_NAME,
           version = version,
           description = 'Image Creator for Linux Distributions',