-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
32 lines (26 loc) · 915 Bytes
/
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
import setuptools
import ast
def get_version(filepath):
with open(filepath, "r") as f:
root = ast.parse(f.read())
version = None
for statement in root.body:
if isinstance(statement, ast.Assign):
for target in statement.targets:
if isinstance(target, ast.Name) and target.id == "__version__":
return ast.literal_eval(statement.value)
assert version, "Could not determine version"
return version
with open("README.md", "r") as f:
long_description = f.read()
setuptools.setup(
name="mayawalk",
version=get_version("mayawalk.py"),
description="Collection of traversal algorithms for Autodesk Maya",
long_description=long_description,
long_description_content_type="text/markdown",
author="Thibaud Gambier",
license="MIT",
url="https://github.com/tahv/mayawalk",
py_modules=["mayawalk"],
)