Skip to content

Commit

Permalink
Add setup.py, some minor reorganization to support it
Browse files Browse the repository at this point in the history
  • Loading branch information
delucks committed Nov 2, 2017
1 parent 0d4c0d6 commit e78ce94
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ pip-selfcheck.json
__pycache__
share/*
.cache/*
build/*
dist/*
*egg-info*
3 changes: 2 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright 2017 Jamie Luck
Copyright (c) 2017 Jamie Luck
All right reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
5 changes: 4 additions & 1 deletion gtd.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def review(tags, no_tags, match, listname, attachments, has_due, daily):
click.echo('All done, have a great day!')


if __name__ == '__main__':
def main():
try:
cli()
except requests.exceptions.ConnectionError:
Expand All @@ -335,3 +335,6 @@ def review(tags, no_tags, match, listname, attachments, has_due, daily):
else:
print('Quitting due to error')
sys.exit(1)

if __name__ == '__main__':
main()
40 changes: 40 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from setuptools import setup
import sys

sys.path.extend('.')
from todo import __version__

with open('requirements.txt') as f:
reqs = [l.strip() for l in f]

setup(
name='gtd.py',
version=__version__,
install_requires=reqs,
packages=['todo'],
entry_points={
'console_scripts': [
'gtd = gtd:main'
]
},
author = 'James Luck',
author_email = 'me@jamesluck.com',
license='BSD 3-clause',
url = 'https://github.com/delucks/gtd.py',
download_url = 'https://github.com/delucks/gtd.py/tarball/{}'.format(__version__),
keywords = ['productivity', 'cli', 'trello', 'gtd', 'getting things done'],
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: BSD',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Utilities'
]
)

0 comments on commit e78ce94

Please sign in to comment.