Skip to content

Commit

Permalink
Add a setup.py script for installation
Browse files Browse the repository at this point in the history
Let a user install pymodoro if they like with:
    python setup.py install
  • Loading branch information
mickboldon committed May 9, 2013
1 parent 3df6f39 commit d31a0c4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pymodoro.py
Expand Up @@ -454,6 +454,9 @@ def notify(self, strings):
pass


if __name__ == "__main__":
def main():
pymodoro = Pymodoro()
pymodoro.run()

if __name__ == "__main__":
main()
14 changes: 14 additions & 0 deletions setup.py
@@ -0,0 +1,14 @@
import os
import glob
from setuptools import setup

datadir = 'data'
datafiles = [(datadir, [f for f in glob.glob(os.path.join(datadir, '*'))])]

setup(
name='pymodoro',
version='0.1',
py_modules=['pymodoro'],
data_files=datafiles,
entry_points={"console_scripts": ["pymodoro = pymodoro:main"]},
)

0 comments on commit d31a0c4

Please sign in to comment.