-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup.py
30 lines (22 loc) · 837 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
# Copyright (c) Karan Desai (https://kdexd.xyz), The University of Michigan.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import codecs
import os
from setuptools import setup
def get_version(rel_path: str):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), "r") as fp:
for line in fp.read().splitlines():
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
setup(
name="redcaps",
version=get_version("redcaps/__init__.py"),
author="Karan Desai",
python_requires=">=3.6",
entry_points={"console_scripts": ["redcaps=redcaps.main:main"]},
license="MIT",
zip_safe=True,
)