-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
35 lines (27 loc) · 868 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
33
34
35
import os
import re
from setuptools import setup, find_packages
with open("VERSION") as vf:
__version__ = vf.readline().strip()
__desc__ = "Blockworkr"
if os.path.exists("./requirements.txt"):
with open("./requirements.txt", "r") as reqs:
__requirements__ = [
x.strip() for x in reqs.readlines() if not x.startswith("--")
]
else:
raise Exception("Missing requirements.txt")
re_strip_version = re.compile(r"(\w*)")
def strip_version(req):
return re_strip_version.match(req).groups()[0].lower()
setup(
name="blockworkr",
version=__version__,
author="Zeb Palmer",
author_email="[email protected]",
url="https://github.com/zebpalmer/blockworkr",
scripts=["scripts/blockworkr-ws"],
install_requires=__requirements__,
description=__desc__,
packages=find_packages(exclude=("tests",)),
)