This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
61 lines (52 loc) · 1.51 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
import re
from setuptools import setup, find_packages
def get_version():
version_file = "bqclient/_version.py"
line = open(version_file, "rt").read()
version_regex = r"^__version__\s*=\s*['\"]([^'\"]*)['\"]"
match_object = re.search(version_regex, line, re.MULTILINE)
if match_object:
return match_object.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % version_file)
try:
from Cython.Build import cythonize
extensions = cythonize("bqclient/host/drivers/printrun/gcoder_line.pyx")
from Cython.Distutils import build_ext
except ImportError as e:
print("WARNING: Failed to cythonize: %s" % e)
# Debug helper: uncomment these:
# import traceback
# traceback.print_exc()
extensions = []
build_ext = None
setup(name="bqclient",
author="Justin Nesselrotte",
author_email="[email protected]",
description="BotQio's client bqclient",
version=get_version(),
url="http://github.com/BotQio/bqclient/",
packages=find_packages(),
ext_modules=extensions,
entry_points={
"console_scripts": [
"bqclient = bqclient.__main__:main"
]
},
setup_requires=[
"Cython",
"pytest-runner"
],
install_requires=[
'appdirs',
'click',
'deepdiff',
'requests',
'pyserial',
'sentry-sdk==0.10.2',
'zeroconf'
],
tests_require=[
"pytest",
],
)