[mirrorbrain-commits] r8055 - /trunk/mb/setup.py

From: <poeml_at_mirrorbrain.org>
Date: Thu, 06 May 2010 16:34:56 -0000
Author: poeml
Date: Thu May  6 18:34:56 2010
New Revision: 8055

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8055&view=rev
Log:
mb module: 
- the last change (r8054) wasn't quite complete - it broke the build stage of the setup
- make it work when installing with a prefix and build root

Modified:
    trunk/mb/setup.py

Modified: trunk/mb/setup.py
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mb/setup.py?rev=8055&r1=8054&r2=8055&view=diff
==============================================================================
--- trunk/mb/setup.py (original)
+++ trunk/mb/setup.py Thu May  6 18:34:56 2010
_at_@ -22,8 +22,12 @@
 # Therefore, we remove mb.py and only leave mb.
 # Don't know if there's a better way to achieve this...
 from distutils.command.install_scripts import install_scripts
+from os.path import join, exists
+from os import unlink, rename
 script_install_dir = s.get_command_obj('install_scripts').install_dir
 
-from os.path import join
-from os import unlink
-unlink(join(script_install_dir, 'mb.py'))
+if script_install_dir:
+    if exists(join(script_install_dir, 'mb')):
+        unlink(join(script_install_dir, 'mb.py'))
+    else:
+        rename(join(script_install_dir, 'mb.py'), join(script_install_dir, 'mb'))




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Thu May 06 2010 - 16:35:00 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT