Skip to content

Commit

Permalink
Alias cli.main and read metadata in setup
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljoseph committed Oct 16, 2013
1 parent f48b753 commit 707adca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
3 changes: 3 additions & 0 deletions changes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
__url__ = 'https://github.com/michaeljoseph/changes'
__author__ = 'Michael Joseph'
__email__ = 'michaeljoseph@gmail.com'


from .cli import main # noqa
4 changes: 2 additions & 2 deletions changes/__main__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import changes.cli
changes.cli.main()
import changes
changes.main()
22 changes: 13 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import re
from setuptools import setup
import changes

init_py = open('changes/__init__.py').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py))
metadata['doc'] = re.findall('"""(.+)"""', init_py)[0]

setup(
name=changes.__name__,
version=changes.__version__,
description=changes.__doc__,
author=changes.__author__,
author_email=changes.__email__,
url=changes.__url__,
packages=[changes.__name__],
name='changes',
version=metadata['version'],
description=metadata['doc'],
author=metadata['author'],
author_email=metadata['email'],
url=metadata['url'],
packages=['changes'],
install_requires=[
'docopt < 1.0.0',
'path.py < 5.0.0',
Expand All @@ -17,7 +21,7 @@
],
entry_points={
'console_scripts': [
'changes = changes.cli:main',
'changes = changes:main',
],
},
test_suite='nose.collector',
Expand Down

0 comments on commit 707adca

Please sign in to comment.