setup.py 2.34 KB
Newer Older
spmohanty's avatar
spmohanty committed
1
2
3
4
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""The setup script."""
5
import os
6
import sys
7

8
from setuptools import setup, find_packages
spmohanty's avatar
spmohanty committed
9

u214892's avatar
u214892 committed
10
assert sys.version_info >= (3, 6)
u214892's avatar
u214892 committed
11
with open('README.md') as readme_file:
spmohanty's avatar
spmohanty committed
12
13
    readme = readme_file.read()

14
15
16

def get_all_svg_files(directory='./svg/'):
    ret = []
17
18
    for dirpath, subdirs, files in os.walk(directory):
        for f in files:
19
            ret.append(os.path.join(dirpath, f))
20
21
22
    return ret


23
24
def get_all_images_files(directory='./images/'):
    ret = []
25
26
    for dirpath, subdirs, files in os.walk(directory):
        for f in files:
27
            ret.append(os.path.join(dirpath, f))
28
29
30
    return ret


31
32
def get_all_notebook_files(directory='./notebooks/'):
    ret = []
33
34
    for dirpath, subdirs, files in os.walk(directory):
        for f in files:
35
            ret.append(os.path.join(dirpath, f))
36
37
38
    return ret


39
40
41
42
43
44
45
46
47
48
49
50
# Gather requirements from requirements_dev.txt
install_reqs = []
requirements_path = 'requirements_dev.txt'
with open(requirements_path, 'r') as f:
    install_reqs += [
        s for s in [
            line.strip(' \n') for line in f
        ] if not s.startswith('#') and s != ''
    ]
requirements = install_reqs
setup_requirements = install_reqs
test_requirements = install_reqs
spmohanty's avatar
spmohanty committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64

setup(
    author="S.P. Mohanty",
    author_email='mohanty@aicrowd.com',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ],
    description="Multi Agent Reinforcement Learning on Trains",
    entry_points={
        'console_scripts': [
65
            'flatland-demo=flatland.cli:demo',
66
            'flatland-evaluator=flatland.cli:evaluator'
spmohanty's avatar
spmohanty committed
67
68
69
        ],
    },
    install_requires=requirements,
70
    long_description=readme,
spmohanty's avatar
spmohanty committed
71
    long_description_content_type="text/markdown",
spmohanty's avatar
spmohanty committed
72
73
    include_package_data=True,
    keywords='flatland',
74
    name='flatland-rl',
spiglerg's avatar
spiglerg committed
75
    packages=find_packages('.'),
76
77
78
    data_files=[('svg', get_all_svg_files()),
                ('images', get_all_images_files()),
                ('notebooks', get_all_notebook_files())],
spmohanty's avatar
spmohanty committed
79
80
81
    setup_requires=setup_requirements,
    test_suite='tests',
    tests_require=test_requirements,
82
    url='https://gitlab.aicrowd.com/flatland/flatland',
83
    version='2.1.10',
spmohanty's avatar
spmohanty committed
84
85
    zip_safe=False,
)