forked from mathisonian/python-yelp-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
52 lines (41 loc) · 1.36 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python
#
'''The setup and build script for the python-yelp-v2 library.'''
__author__ = '[email protected]'
__version__ = '0.5.5'
# The base package metadata to be used by both distutils and setuptools
METADATA = dict(
name = "python-yelp-v2",
version = __version__,
py_modules = ['yelp', 'filecache'],
author='Matthew Conlen',
author_email='[email protected]',
description='A Python wrapper around the Yelp API v2',
license='MIT',
url='https://github.com/mathisonian/python-yelp-v2',
keywords='yelp api',
)
# Extra package metadata to be used only if setuptools is installed
SETUPTOOLS_METADATA = dict(
install_requires = ['setuptools', 'oauth2'],
include_package_data = True
)
def Read(file):
return open(file).read()
def BuildLongDescription():
return '\n'.join([Read('README.md')])
def Main():
# Build the long_description from the README and CHANGES
# METADATA['long_description'] = BuildLongDescription()
# Use setuptools if available, otherwise fallback and use distutils
try:
import setuptools
METADATA.update(SETUPTOOLS_METADATA)
setuptools.setup(**METADATA)
except ImportError:
print "Could not import setuptools, using distutils"
print "NOTE: You will need to install dependencies manualy"
import distutils.core
distutils.core.setup(**METADATA)
if __name__ == '__main__':
Main()