From ad255ec938cd30fccfa4f35158014a6ebcab5864 Mon Sep 17 00:00:00 2001 From: Brendan Abel Date: Tue, 30 Jan 2018 18:41:41 -0800 Subject: [PATCH] Added setup.py to support standard python distribution. --- .gitignore | 4 ++++ setup.py | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index e8372979..e876cf74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ docs/_build/doctrees shotgunEventDaemon.conf *.pyc +build/ +dist/ +.egg-info +*.egg-info \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..aaf7ad3e --- /dev/null +++ b/setup.py @@ -0,0 +1,21 @@ + +import re +from os.path import dirname, abspath, join, normpath + +from setuptools import setup, find_packages + +# Get version from source file +with open(normpath(join(abspath(__file__), '../src/shotgunEventDaemon.py')), 'rU') as f: + m = re.search(r'\s*__version__ = [\'"]([^\'"]+)[\'"]', f.read()) + version = m.group(1) + +setup( + name='shotgunEvents', + version=version, + zip_safe=False, + package_dir={'': 'src'}, + py_modules=['shotgunEventDaemon', 'daemonizer'], + entry_points={ + 'console_scripts': ['shotgunEventDaemon=shotgunEventDaemon:main'], + }, +)