forked from exosite-labs/pyonep
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
40 lines (34 loc) · 1.28 KB
/
setup.py
File metadata and controls
40 lines (34 loc) · 1.28 KB
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
from distutils.core import setup
import re
with open('requirements.txt') as f:
required = f.read().splitlines()
version = ''
with open('pyonep/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError('Cannot find version information')
try:
import json
except ImportError:
try:
import simplejson
print("###### running python version earlier than 2.6 but simplejson is present")
except ImportError:
print("######")
print("###### pyonep requires python-simplejson for use with Python 2.5")
print("###### It may be found here: https://pypi.python.org/pypi/simplejson/")
print("######")
setup(name='pyonep',
version=version,
url='http://github.com/exosite-labs/pyonep',
author='Exosite',
author_email='labs@exosite.com',
description='Python bindings for Exosite API over HTTP JSON RPC.',
long_description=open('README.md').read() + '\n\n' +
open('HISTORY.md').read(),
install_requires=required,
packages=['pyonep', 'pyonep.portals'],
package_dir={'pyonep': 'pyonep'},
keywords=['exosite', 'onep', 'one platform', 'm2m']
)