-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
41 lines (37 loc) · 1.5 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
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import re
# NoseTestCommand allow to launch nosetest with the command 'python setup.py test'
class NoseTestCommand(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# Run nose ensuring that argv simulates running nosetests directly
import nose
nose.run_exit(argv=['nosetests'])
module_file = open("eikon/__init__.py").read()
metadata = dict(re.findall("__([a-z]+)__\s*=\s*'([^']+)'", module_file))
version = metadata['version']
setup(name='eikon',
version= metadata['version'],
description='Python package for retrieving Eikon data.',
long_description='Python package for retrieving Eikon data.',
url='https://developers.thomsonreuters.com/tr-eikon-scripting-apis/python-thin-library-pyeikon/',
author='Thomson Reuters',
author_email='',
license='LICENSE',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
use_2to3=True,
zip_safe=False,
install_requires=['requests',
'datetime',
'pandas>=0.17.0',
'appdirs',
'python-dateutil',
'websocket-client'],
test_suite='nose.collector',
tests_require=['nose', 'mock', 'lettuce'],
cmdclass={'test': NoseTestCommand}
)