forked from basho/riak-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·79 lines (72 loc) · 2.63 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·79 lines (72 loc) · 2.63 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python
import os
import platform
import distutils.command.build_ext
import distutils.extension
from setuptools import setup, find_packages
from version import get_version
from commands import setup_timeseries, build_messages
pb_env_key = 'PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'
install_requires = ['six >= 1.8.0']
requires = ['six(>=1.8.0)']
ext_modules = []
if platform.python_version() < '2.7.9':
install_requires.append("pyOpenSSL >= 0.14")
requires.append("pyOpenSSL(>=0.14)")
if platform.python_version() < '3.0':
install_requires.append('protobuf >=2.4.1, <2.7.0')
requires.append('protobuf(>=2.4.1, <2.7.0)')
if os.environ.get(pb_env_key, 'unset') == 'cpp':
ext_modules = [
distutils.extension.Extension(
'riak.pb._riak_pbcpp',
sources=['src/_riak_pbcpp.cc', 'src/riak.pb.cc'],
libraries=['protobuf'])
]
else:
if os.environ.get(pb_env_key, 'unset') == 'cpp':
raise StandardError('CPP protobuf is not supported in Python 3')
else:
install_requires.append('python3_protobuf >=2.4.1, <2.6.0')
requires.append('python3_protobuf(>=2.4.1, <2.6.0)')
tests_require = []
if platform.python_version() < '2.7.0':
tests_require.append("unittest2")
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup(
name='riak',
version=get_version(),
packages=find_packages(),
requires=requires,
install_requires=install_requires,
tests_require=tests_require,
package_data={'riak': ['erl_src/*']},
description='Python client for Riak',
long_description=long_description,
zip_safe=True,
options={'easy_install': {'allow_hosts': 'pypi.python.org'}},
include_package_data=True,
ext_modules=ext_modules,
license='Apache 2',
platforms='Platform Independent',
author='Basho Technologies',
author_email='clients@basho.com',
test_suite='riak.tests.suite',
url='https://github.com/basho/riak-python-client',
cmdclass={
'build_messages': build_messages,
'setup_timeseries': setup_timeseries
},
classifiers=['License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Database']
)