diff options
author | JF Ding <jian-feng.ding@intel.com> | 2011-11-03 20:21:04 +0800 |
---|---|---|
committer | JF Ding <jian-feng.ding@intel.com> | 2011-11-03 20:21:04 +0800 |
commit | 14dfc92d9aee9430a81e5a71a26d002dbd6d5d04 (patch) | |
tree | 7df9bae0dc4cdeeb3efd62f4820c95715b031468 /setup.py | |
parent | 1cd6640deaf71d56b71740611ba08926c8c6f6e4 (diff) | |
download | mic-14dfc92d9aee9430a81e5a71a26d002dbd6d5d04.tar.gz mic-14dfc92d9aee9430a81e5a71a26d002dbd6d5d04.tar.bz2 mic-14dfc92d9aee9430a81e5a71a26d002dbd6d5d04.zip |
make tools/mic more flexible for python path
to make it live with virtualenv
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -28,22 +28,21 @@ try: ver_file.close() except IOError: print 'WARNING: Cannot write version number file' - pass # --install-layout is recognized after 2.5 if sys.version_info[:2] > (2, 5): if len(sys.argv) > 1 and 'install' in sys.argv: - dist=None - import platform try: + import platform (dist, ver, id) = platform.linux_distribution() + + # for debian-like distros, mods will be installed to + # ${PYTHONLIB}/dist-packages + if dist in ('debian', 'Ubuntu'): + sys.argv.append('--install-layout=deb') except: pass - # for debian-like distros, set deb-layout py-lib - if dist in ('debian', 'Ubuntu'): - sys.argv.append('--install-layout=deb') - PACKAGES = [MOD_NAME, MOD_NAME + '/utils', MOD_NAME + '/imager', |