Mercurial > wikked
changeset 234:bcbe934eab29 0.3.0
Fixed `setuptools` package:
- Correct requirements.
- Correct script/entry-point.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 16 Mar 2014 21:39:59 -0700 |
parents | 141c93f87645 |
children | dcb08aa934a9 |
files | requirements.txt setup.py wikked/witch.py |
diffstat | 3 files changed, 34 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/requirements.txt Sat Mar 15 17:48:51 2014 -0700 +++ b/requirements.txt Sun Mar 16 21:39:59 2014 -0700 @@ -1,9 +1,10 @@ Flask==0.10.1 Flask-Bcrypt==0.5.2 -Flask-Login==0.1.3 +Flask-Login==0.2.10 Flask-Script==0.5.1 -Jinja2==2.6 +Jinja2==2.7.2 Markdown==2.2.1 +Pygments==1.6 SQLAlchemy==0.9.3 Whoosh==2.5.5 colorama==0.2.7
--- a/setup.py Sat Mar 15 17:48:51 2014 -0700 +++ b/setup.py Sun Mar 16 21:39:59 2014 -0700 @@ -21,7 +21,7 @@ # (this is loosely based on what Mercurial does) version = None try: - if os.path.isdir('.hg'): + if os.path.isdir(os.path.join(os.path.dirname(__file__), '.hg')): cmd = ['hg', 'log', '-r', '.', '--template', '{tags}\n'] tags, err = runcmd(cmd) versions = [t for t in tags.split() if t[0].isdigit()] @@ -72,28 +72,27 @@ keywords="wiki mercurial hg git", packages=find_packages(exclude=["tests"]), install_requires=[ - 'Flask>=0.10', - 'Flask-Login>=0.1.3', - 'Flask-SQLAlchemy>=1.0', - 'Flask-Script>=0.5.1', - 'Jinja2>=2.6', - 'Markdown>=2.2.1', - 'PyYAML>=3.10', - 'Pygments>=1.5', - 'SQLAlchemy>=0.8.3', - 'Werkzeug>=0.8.3', - 'Whoosh>=2.4.1', - 'argparse>=1.2.1', - 'pybars>=0.0.4', - 'python-hglib', - 'twill>=0.9', - 'wsgiref>=0.1.2' - ], - scripts=['wk.py'], + 'Flask==0.10.1', + 'Flask-Bcrypt==0.5.2', + 'Flask-Login==0.2.10', + 'Flask-Script==0.5.1', + 'Jinja2==2.7.2', + 'Markdown==2.2.1', + 'Pygments==1.6', + 'SQLAlchemy==0.9.3', + 'Whoosh==2.5.5', + 'colorama==0.2.7', + 'py-bcrypt==0.2', + 'pysqlite==2.6.3', + 'pytest==2.5.2', + 'repoze.lru==0.6', + 'python-hglib'], include_package_data=True, package_data={ 'wikked': [ - 'resources/*', + 'resources/defaults.cfg', + 'resources/hg_log.style', + 'resources/init/*', 'templates/*.html', 'static/bootstrap/fonts/*', 'static/css/wikked.min.css', @@ -115,7 +114,7 @@ ], entry_points={ 'console_scripts': [ - 'wk = wikked.witch:main' + 'wk = wikked.witch:real_main' ] }, )
--- a/wikked/witch.py Sat Mar 15 17:48:51 2014 -0700 +++ b/wikked/witch.py Sun Mar 16 21:39:59 2014 -0700 @@ -146,6 +146,7 @@ delta = after - before logger.debug("Ran command in %fs" % delta.total_seconds()) + def print_version(): if os.path.isdir(os.path.join(os.path.dirname(__file__), '..', '.hg')): print "Wikked (development version)" @@ -157,3 +158,13 @@ return 1 print "Wikked %s" % version return 0 + + +def real_main(): + colorama.init() + root_logger = logging.getLogger() + handler = logging.StreamHandler(stream=sys.stdout) + handler.setFormatter(ColoredFormatter('%(message)s')) + root_logger.addHandler(handler) + + main()