-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (52 loc) · 1.35 KB
/
setup.py
File metadata and controls
58 lines (52 loc) · 1.35 KB
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
from cx_Freeze import setup, Executable
import sys
import shutil
import os
import pathlib
import dateparser
sys.path.insert(0, os.path.abspath("src"))
base = None
executables = [Executable("src/main.py", base=base, target_name="terabot.exe")]
dateparser_pkg_dir = pathlib.Path(dateparser.__file__).parent
dateparser_data_dir = dateparser_pkg_dir / "data"
build_exe_options = {
"packages": [
"websockets",
"talib",
"requests",
"urllib3",
"dateparser",
"dateparser.data",
"dateparser.data.date_translation_data",
],
"includes": [
"websockets.legacy",
"websockets.client",
"websockets.server",
"talib",
"certifi",
"requests",
"urllib3",
"dateparser.languages.loader",
"dateparser.conf",
"dateparser.date",
],
"excludes": [],
"zip_include_packages": ["*"],
"zip_exclude_packages": ["websockets", "talib", "dateparser"],
"include_files": [
("src/settings.example.toml", "settings.toml"),
],
"include_msvcr": True,
}
build_dir = "build"
if os.path.isdir(build_dir):
shutil.rmtree(build_dir)
setup(
name="tera-bot",
version="0.1",
description="tera-bot packaged with cx_Freeze",
options={"build_exe": build_exe_options},
executables=executables,
script_args=["build"],
)