Mercurial > p > roundup > code
comparison roundup/scripts/roundup_mailgw.py @ 4766:86ef4ab17dc5
Run scripts (roundup_admin.py, ...) directly from checkout.
Convenient when you don't want to install Roundup, but want
to run latest version.
| author | anatoly techtonik <techtonik@gmail.com> |
|---|---|
| date | Thu, 21 Feb 2013 20:49:45 +0300 |
| parents | 6e3e4f24c753 |
| children | 63574f1f3570 |
comparison
equal
deleted
inserted
replaced
| 4765:c6694cff29bc | 4766:86ef4ab17dc5 |
|---|---|
| 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 16 | 16 |
| 17 """Command-line script stub that calls the roundup.mailgw. | 17 """Command-line script stub that calls the roundup.mailgw. |
| 18 """ | 18 """ |
| 19 __docformat__ = 'restructuredtext' | 19 __docformat__ = 'restructuredtext' |
| 20 | |
| 21 | |
| 22 # --- patch sys.path to make sure 'import roundup' finds correct version | |
| 23 import sys | |
| 24 import os.path as osp | |
| 25 | |
| 26 thisdir = osp.dirname(osp.abspath(__file__)) | |
| 27 rootdir = osp.dirname(osp.dirname(thisdir)) | |
| 28 if (osp.exists(thisdir + '/__init__.py') and | |
| 29 osp.exists(rootdir + '/roundup/__init__.py')): | |
| 30 # the script is located inside roundup source code | |
| 31 sys.path.insert(0, rootdir) | |
| 32 # --/ | |
| 33 | |
| 20 | 34 |
| 21 # python version check | 35 # python version check |
| 22 from roundup import version_check | 36 from roundup import version_check |
| 23 from roundup import __version__ as roundup_version | 37 from roundup import __version__ as roundup_version |
| 24 | 38 |
