forked from walkr/oi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
76 lines (67 loc) · 1.99 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python
import sys
try:
import setuptools
from setuptools import setup
except ImportError:
setuptools = None
from distutils.core import setup
is_py3 = sys.version_info.major == 3
readme_file = 'README.md'
def read_long_description(readme_file):
""" Read package long description from README file """
try:
import pypandoc
except (ImportError, OSError) as e:
print('No pypandoc or pandoc: %s' % (e,))
if is_py3:
fh = open(readme_file, encoding='utf-8')
else:
fh = open(readme_file)
long_description = fh.read()
fh.close()
return long_description
else:
return pypandoc.convert(readme_file, 'rst')
def read_version():
""" Read package version """
with open('./oi/version.py') as fh:
for line in fh:
if line.startswith('VERSION'):
return line.split('=')[1].strip().strip("'")
setup(
name='oi',
version=read_version(),
packages=['oi'],
author='Tony Walker',
author_email='[email protected]',
url='https://github.com/walkr/oi',
license='MIT',
description='A library for writing long running processes '
'with a cli interface',
long_description=read_long_description(readme_file),
install_requires=[
'nose',
'nanomsg',
'nanoservice',
'colorama',
],
dependency_links=[
'git+https://github.com/tonysimpson/nanomsg-python.git@master#egg=nanomsg',
],
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
entry_points={
'console_scripts': [
'oi = oi.script:main',
],
},
)