Author: poeml Date: Thu May 6 18:18:16 2010 New Revision: 8054 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8054&view=rev Log: mb module: Since the "mb" script has the same name as the Python module, it'd try to import itself as long as there's mb.py in the script's directory. Therefore, we remove mb.py and only leave mb. Don't know if there's a better way to achieve this... Modified: trunk/mb/setup.py Modified: trunk/mb/setup.py URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mb/setup.py?rev=8054&r1=8053&r2=8054&view=diff ============================================================================== --- trunk/mb/setup.py (original) +++ trunk/mb/setup.py Thu May 6 18:18:16 2010 _at_@ -2,7 +2,7 @@ from distutils.core import setup, Extension -setup(name='mb', +s = setup(name='mb', version='2.13.0', description='mb, a tool to maintain the MirrorBrain database', author='MirrorBrain project', _at_@ -15,3 +15,15 @@ ext_modules=[Extension('zsync', sources=['zsyncmodule.c'])], ) + + +# Since the "mb" script has the same name as the Python module, it'd +# try to import itself as long as there's mb.py in the script's directory. +# 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 +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')) _______________________________________________ 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.orgReceived on Thu May 06 2010 - 16:18:21 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT