forked from avdstaaij/gdpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
71 lines (63 loc) · 2.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import os
from setuptools import setup
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
METADATA_FILE_PATH = os.path.join(SCRIPT_DIR, "gdpc/__init__.py")
# Based on https://github.com/pypa/pip/blob/9aa422da16e11b8e56d3597f34551f983ba9fbfd/setup.py
def get_metadata(name: str) -> str:
with open(METADATA_FILE_PATH) as file:
contents = file.read()
for line in contents.splitlines():
dunderString = f"__{name}__"
if line.startswith(f"{dunderString}"):
# __{name}__ = "{value}"
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError(f"Unable to find {dunderString} value.")
with open("README.md", "r", encoding="utf-8") as readme:
long_description = readme.read()
setup(
name=get_metadata("title"),
version=get_metadata("version"),
description=get_metadata("description"),
long_description=long_description,
long_description_content_type="text/markdown",
url=get_metadata("url"),
author=get_metadata("author"),
author_email=get_metadata("author_email"),
maintainer=get_metadata("maintainer"),
maintainer_email=get_metadata("maintainer_email"),
license=get_metadata("license"),
packages=["gdpc"], # Note: subpackages must be listed explicitly
install_requires=[
"matplotlib",
"more-itertools",
"NBT",
"numpy",
"opencv_python",
"PyGLM >= 2.7.0",
"pyglm-typing",
"requests",
"scikit-image",
"scipy",
"termcolor"
],
python_requires=">=3.7, <4",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Topic :: Games/Entertainment :: Simulation",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Version Control :: Git",
],
keywords="GDMC, generative design, Minecraft, HTTP, development",
project_urls={
"Bug Reports": "https://github.com/avdstaaij/gdpc/issues",
"Official Competition": "https://gendesignmc.engineering.nyu.edu",
"Chat about it on Discord": "https://discord.gg/V9MW65bD",
"Source": "https://github.com/avdstaaij/gdpc",
},
zip_safe=False
)