forked from sanderland/katrain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (54 loc) · 2.07 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
import re
import os
from setuptools import find_packages, setup
package_data = {"": ["*.json", "*.kv","*.wav"], "katrain": [], "tests": []}
packages = find_packages(exclude=["tests"])
version = re.search('^VERSION\s*=\s*"(.*)"', open("katrain/core/constants.py").read(), re.M).group(1)
def include_data_files(directory):
for root, subfolders, files in os.walk(directory):
for fn in files:
filename = os.path.join(root.replace("/", os.path.sep), fn)
parts = filename.split(os.path.sep)
package_data[parts[0]].append(os.path.join(*parts[1:]))
include_data_files("katrain/KataGo")
include_data_files("katrain/models")
include_data_files("katrain/fonts")
include_data_files("katrain/img/")
include_data_files("katrain/img/flaticon")
include_data_files("katrain/i18n")
print(packages, package_data)
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="KaTrain",
version=version,
description="Go/Baduk/Weiqi playing and teaching app with a variety of AIs",
long_description=long_description,
long_description_content_type="text/markdown",
author="Sander Land",
url="https://github.com/sanderland/katrain",
license="MIT",
install_requires=[
"wheel",
"setuptools",
"importlib_resources ;python_version<'3.7'",
"pygame", # some versions need this for kivy
"cython>=0.24,<=0.29.14,!=0.27,!=0.27.2", # kivy wants this
"kivy_deps.glew;platform_system=='Windows'",
"kivy_deps.sdl2;platform_system=='Windows'",
"kivy_deps.gstreamer;platform_system=='Windows'",
"kivy>=2.0.0rc2",
"kivymd>=0.104.1",
"screeninfo", # for screen resolution
],
python_requires=">=3.6, <4",
entry_points={"console_scripts": ["katrain=katrain.__main__:run_app"]},
classifiers=[
"Development Status :: 4 - Beta",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
],
packages=packages,
package_data=package_data,
)