-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
34 lines (29 loc) · 971 Bytes
/
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
import distutils.cmd
from setuptools import setup, find_packages
import setuptools.command.build_py
import ib_tws_server.codegen.main
import os.path
class CodegenCommand(distutils.cmd.Command):
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
dir = os.path.dirname(os.path.realpath(__file__))
dir = os.path.join(dir, "ib_tws_server", "gen")
ib_tws_server.codegen.main.generate(dir)
setuptools.command.build_py.build_py.run(self)
class BuildPyCommand(setuptools.command.build_py.build_py):
def run(self):
self.run_command('codegen')
setuptools.command.build_py.build_py.run(self)
setup(name='ib_tws_server',
version='0.0',
description='Interactive Brokers TWS Server',
author='Chandra Penke',
url='https://github.com/ncpenke/py_ib_tws_server',
cmdclass={
'codegen': CodegenCommand,
'build_py': BuildPyCommand
}
)