forked from SforAiDl/genrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
88 lines (75 loc) · 2.54 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import codecs
import os
from setuptools import find_packages, setup
# Basic information
NAME = "genrl"
DESCRIPTION = "A PyTorch reinforcement learning library for generalizable and reproducible algorithm implementations."
VERSION = "0.0.2"
AUTHOR = "Society for Artificial Intelligence and Deep Learning"
EMAIL = "[email protected]"
LICENSE = "MIT"
REPOSITORY = "https://github.com/SforAiDl/genrl"
PACKAGE = "genrl"
with open("README.md", "r") as f:
LONG_DESCRIPTION = f.read()
# Define the keywords
KEYWORDS = ("reinforcement learning", "pytorch", "machine learning", "deep learning")
# Define the classifiers
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = (
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
)
# Important Paths
PROJECT = os.path.abspath(os.path.dirname(__file__))
REQUIRE_PATH = "requirements.txt"
VERSION_PATH = os.path.join(PACKAGE, "version.py")
PKG_DESCRIBE = "README.md"
# Directories to ignore in find_packages
EXCLUDES = ()
# helper functions
def read(*parts):
"""
returns contents of file
"""
with codecs.open(os.path.join(PROJECT, *parts), "rb", "utf-8") as file:
return file.read()
def get_requires(path=REQUIRE_PATH):
"""
generates requirements from file path given as REQUIRE_PATH
"""
for line in read(path).splitlines():
line = line.strip()
if line and not line.startswith("#"):
yield line
# Define the configuration
CONFIG = {
"name": NAME,
"version": VERSION,
"description": DESCRIPTION,
"long_description": LONG_DESCRIPTION,
"long_description_content_type": "text/markdown",
"classifiers": CLASSIFIERS,
"keywords": KEYWORDS,
"license": LICENSE,
"author": AUTHOR,
"author_email": EMAIL,
"url": REPOSITORY,
"project_urls": {"Source": REPOSITORY},
"packages": find_packages(where=PROJECT, exclude=EXCLUDES),
"install_requires": list(get_requires()),
"python_requires": ">=3.6",
}
if __name__ == "__main__":
setup(**CONFIG)