-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
51 lines (41 loc) · 1.4 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
#!/usr/bin/env python3
# flake8: noqa
"""Setup script for the repository."""
from os.path import dirname
from os.path import realpath
from setuptools import find_packages
from setuptools import setup
from setuptools import Distribution
import setuptools.command.build_ext as _build_ext
import subprocess
from il_traffic.version import __version__
def _read_requirements_file():
req_file_path = '%s/requirements.txt' % dirname(realpath(__file__))
with open(req_file_path) as f:
return [line.strip() for line in f]
class BuildExt(_build_ext.build_ext):
"""External build commands."""
def run(self):
"""Install traci wheels."""
subprocess.check_call(['pip', 'install', 'ray[tune]'])
subprocess.check_call(['il_traffic/scripts/load_warmup.sh'])
class BinaryDistribution(Distribution):
"""See parent class."""
@staticmethod
def has_ext_modules():
"""Return True for external modules."""
return True
setup(
name='il-traffic',
version=__version__,
distclass=BinaryDistribution,
cmdclass={"build_ext": BuildExt},
packages=find_packages(),
install_requires=_read_requirements_file(),
description='Learning energy-efficient driving behaviors by imitating '
'experts',
author='Aboudy Kreidieh',
url='https://github.com/AboudyKreidieh/il-traffic',
author_email='[email protected]',
zip_safe=False,
)