forked from joliveros/bitmex-websocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·49 lines (39 loc) · 1.53 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
#!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
from pip.req import parse_requirements
from pip.download import PipSession
from os.path import realpath
def get_reqs_from_file(file):
file_path = realpath(file)
# parse_requirements() returns generator of pip.req.InstallRequirement
# objects
install_requirements = parse_requirements(file_path, session=PipSession)
# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
return [str(ir.req) for ir in install_requirements]
def get_version_info():
version_file = open(realpath('./.version'))
return version_file.read()
setup(name='bitmex_websocket',
version=get_version_info(),
description='Bitmex websocket API',
long_description=open('README.rst').read().strip(),
author='José Oliveros',
author_email='[email protected]',
url='https://github.com/joliveros/bitmex-websocket',
packages=['bitmex_websocket',
'bitmex_websocket.auth'],
install_requires=get_reqs_from_file('./requirements.txt'),
include_package_data=True,
tests_require=get_reqs_from_file('./requirements-test.txt'),
license='MIT License',
zip_safe=True,
keywords='bitmex websocket bot cryptocurrency',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.6',
])