forked from mklein0/sqlalchemy-zipkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
52 lines (39 loc) · 1.12 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
#
import os
import re
from setuptools import setup, find_packages
def read_version(fobj):
# type: (file) -> str
regex = re.compile(r'^__version__\s*=\s*u?[\'"]([^\'"]+)[\'"]')
for line in fobj:
matches = regex.match(line)
if matches:
return matches.group(1)
# Else unknown version
return '0.0'
HERE = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(HERE, 'sqlalchemy_zipkin.py')) as f:
module_version = read_version(f)
with open(os.path.join(HERE, 'README.rst')) as f:
README = f.read()
with open(os.path.join(HERE, 'CHANGES.rst')) as f:
CHANGES = f.read()
setup(
name='SQLAlchemy-Zipkin',
version=module_version,
url='',
license='MIT',
author='mklein0',
author_email='[email protected]',
description='An zipkin extension for sqlalchemy library based on py_zipkin.',
long_description=README + '\n\n' + CHANGES,
classifiers=[
'Programming Language :: Python',
],
py_modules=['sqlalchemy_zipkin'],
platforms='any',
install_requires=[
'py_zipkin>=0.7.0',
'SQLAlchemy>=0.9.8',
],
)