-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathsetup.py
62 lines (52 loc) · 1.88 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
"""Run "python setup.py install" to install graphyte."""
import os
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Read files as byte strings on Python 2.x, unicode strings on 3.x
if sys.version_info < (3, 0):
open_args = {}
else:
open_args = {'encoding': 'utf-8'}
# Because it's best not to import the module in setup.py
with open(os.path.join(os.path.dirname(__file__), 'graphyte.py'), **open_args) as f:
for line in f:
match = re.match(r"__version__.*'([0-9.]+)'", line)
if match:
version = match.group(1)
break
else:
raise Exception("Couldn't find __version__ line in graphyte.py")
# Read long_description from README.rst
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), **open_args) as f:
long_description = f.read()
setup(
name='graphyte',
version=version,
author='Ben Hoyt',
author_email='[email protected]',
url='https://github.com/benhoyt/graphyte',
license='MIT License',
description='Python 3 compatible library to send data to a Graphite metrics server (Carbon)',
long_description=long_description,
py_modules=['graphyte'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
]
)