|
1 | | -from setuptools import setup |
| 1 | +#!/usr/bin/env python |
| 2 | +import re |
| 3 | +import os |
| 4 | +from setuptools import setup, find_packages |
| 5 | + |
| 6 | +try: |
| 7 | + # For pip >= 10. |
| 8 | + from pip._internal.req import parse_requirements |
| 9 | + from pip._internal.download import PipSession |
| 10 | +except ImportError: |
| 11 | + # For pip <= 9.0.3. |
| 12 | + from pip.req import parse_requirements |
| 13 | + from pip.download import PipSession |
| 14 | + |
| 15 | +install_reqs = parse_requirements('./requirements.txt', session=PipSession()) |
| 16 | +reqs = [str(ir.req) for ir in install_reqs] |
| 17 | + |
| 18 | +# Get version |
| 19 | +with open(os.path.join('epsagon', 'constants.py'), 'rt') as consts_file: |
| 20 | + version = re.search(r'__version__ = \'(.*?)\'', consts_file.read()).group(1) |
2 | 21 |
|
3 | 22 | setup( |
4 | | - setup_requires=['pbr'], |
5 | | - pbr=True |
| 23 | + name='epsagon', |
| 24 | + version=version, |
| 25 | + description='Epsagon Instrumentation for Python', |
| 26 | + long_description=open('README.md').read(), |
| 27 | + long_description_content_type='text/markdown', |
| 28 | + author='Epsagon', |
| 29 | + |
| 30 | + url='https://github.com/epsagon/epsagon-python', |
| 31 | + packages=find_packages(exclude=('tests', 'examples')), |
| 32 | + install_requires=reqs, |
| 33 | + license='MIT', |
| 34 | + setup_requires=['pytest-runner'], |
| 35 | + tests_require=['pytest'], |
| 36 | + keywords=[ |
| 37 | + 'serverless', |
| 38 | + 'epsagon', |
| 39 | + 'tracing', |
| 40 | + 'distributed-tracing', |
| 41 | + 'lambda', |
| 42 | + 'aws-lambda', |
| 43 | + 'debugging', |
| 44 | + 'monitoring' |
| 45 | + ], |
| 46 | + classifiers=( |
| 47 | + 'Intended Audience :: Developers', |
| 48 | + 'Operating System :: OS Independent', |
| 49 | + 'Programming Language :: Python', |
| 50 | + 'Programming Language :: Python :: 2.7', |
| 51 | + 'Programming Language :: Python :: 3', |
| 52 | + 'Programming Language :: Python :: 3.4', |
| 53 | + 'Programming Language :: Python :: 3.5', |
| 54 | + 'Programming Language :: Python :: 3.6', |
| 55 | + 'Topic :: Software Development :: Libraries', |
| 56 | + 'Topic :: Software Development :: Libraries :: Python Modules', |
| 57 | + ) |
6 | 58 | ) |
0 commit comments