Skip to content
Browse files

add setup.py

  • Loading branch information...
1 parent e7314ec commit 5c5d02ed7f664ee4e6e50000e42d5385f4a6d76e @lavelle committed Feb 9, 2013
Showing with 42 additions and 11 deletions.
  1. +4 −1 .gitignore
  2. +24 −0 setup.py
  3. +14 −10 src/clipcloud.py
View
5 .gitignore
@@ -8,4 +8,7 @@ src/lib/apikeys.py
clipcloud/*
-*.DS_Store
+*.DS_Store
+
+*.egg-info
+dist
View
24 setup.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+import os
+from setuptools import setup
+
+setup(
+ name='ClipCloud',
+ version='0.1',
+ url='https://github.com/lavelle/ClipCloud',
+
+ author='Giles Lavelle',
+ author_email='giles.lavelle@gmail.com',
+
+ description='Two-step sharing for every kind of data',
+ long_description=open(os.path.join(os.path.dirname(__file__), 'readme.md')).read(),
+
+ install_requires=[
+ 'dropbox'
+ ],
+ py_modules=['src/clipcloud'],
+ entry_points={
+ 'console_scripts': ['clipcloud=clipcloud:main']
+ }
+)
View
24 src/clipcloud.py
@@ -86,13 +86,17 @@ def clipcloud():
args = parser.parse_args()
args.func(args)
-# Don't do anything if this file is being imported as a module
-if __name__ == '__main__':
- # If program execution time is being measured, call the main function from a timer
- if TIMER_ACTIVATED:
- from timeit import Timer
- t = Timer('clipcloud.clipcloud()', 'import clipcloud')
- print t.timeit(number=1)
- # Otherwise just call it
- else:
- clipcloud()
+
+def main():
+ # Don't do anything if this file is being imported as a module
+ if __name__ == '__main__':
+ # If program execution time is being measured, call the main function from a timer
+ if TIMER_ACTIVATED:
+ from timeit import Timer
+ t = Timer('clipcloud.clipcloud()', 'import clipcloud')
+ print t.timeit(number=1)
+ # Otherwise just call it
+ else:
+ clipcloud()
+
+main()

0 comments on commit 5c5d02e

Please sign in to comment.
Something went wrong with that request. Please try again.