-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
57 lines (47 loc) · 1.93 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
import os
import sys
from setuptools import find_packages
from distutils.core import setup
name = "spectate"
# paths used to gather files
here = os.path.abspath(os.path.dirname(__file__))
pkg_root = os.path.join(here, name)
# -----------------------------------------------------------------------------
# Package Basics
# -----------------------------------------------------------------------------
package = dict(
name=name,
license="MIT",
packages=find_packages(exclude=["tests*"]),
python_requires=">=3.6",
description="Track changes to mutable data types.",
classifiers=["Intended Audience :: Developers"],
author="Ryan Morshead",
author_email="[email protected]",
url="https://github.com/rmorshea/spectate",
keywords=["eventful", "callbacks", "mutable", "MVC", "model", "view", "controller"],
platforms="Linux, Mac OS X, Windows",
include_package_data=True,
)
# -----------------------------------------------------------------------------
# Library Version
# -----------------------------------------------------------------------------
with open(os.path.join(pkg_root, "__init__.py")) as f:
for line in f.read().split("\n"):
if line.startswith("__version__ = "):
package["version"] = eval(line.split("=", 1)[1])
break
else:
print("No version found in %s/__init__.py" % pkg_root)
sys.exit(1)
# -----------------------------------------------------------------------------
# Library Description
# -----------------------------------------------------------------------------
package["long_description_content_type"] = "text/markdown"
with open(os.path.join(here, "README.md")) as f:
package["long_description"] = f.read()
# -----------------------------------------------------------------------------
# Install It
# -----------------------------------------------------------------------------
if __name__ == "__main__":
setup(**package)