From 59e117a53c27bd1ddc560c3864cd11d90bdc0760 Mon Sep 17 00:00:00 2001 From: David Lindquist Date: Sun, 12 Jan 2014 23:54:11 -0800 Subject: [PATCH] Add setup script Implements #6 --- .gitignore | 3 +++ MANIFEST.in | 1 + setup.py | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 MANIFEST.in create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index cae6643..12365d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ *.pyc .coverage cover +*.egg-info +/build +/dist diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..376b77a --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include *.txt *.md diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9faf332 --- /dev/null +++ b/setup.py @@ -0,0 +1,47 @@ +from distutils.core import setup +import os +import sys + + +NAME = 'restfulgit' + +VERSION = '0.1.0' + +MIN_PYTHON_VERSION = (2, 7) + +CLASSIFIERS = [ + 'Development Status :: 2 - Beta', + 'Framework :: Flask', + 'Intended Audience :: Developers', + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python :: 2.7', + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Version Control' +] + + +if sys.version_info < MIN_PYTHON_VERSION: + raise Exception( + '%s==%s requires Python %s or higher.' % ( + NAME, + VERSION, + '.'.join([str(x) for x in MIN_PYTHON_VERSION]) + ) + ) + +with open(os.path.join(os.path.dirname(__file__), 'requirements.txt')) as f: + requirements = f.readlines() + +setup( + name=NAME, + version=VERSION, + description='A restful interface for accessing data from Git repositories', + long_description=open('README.md').read(), + classifiers=CLASSIFIERS, + maintainer=('Chris Rebert'), + url='https://github.com/hulu/restfulgit', + provides=[NAME], + packages=['restfulgit'], + zip_safe=True, + install_requires=requirements +)