-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathsetup.py
45 lines (40 loc) · 1.27 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
"""Setup pyhiveapi package."""
# pylint: skip-file
import os
import re
import unasync
from setuptools import setup
def requirements_from_file(filename="requirements.txt"):
"""Get requirements from file."""
with open(os.path.join(os.path.dirname(__file__), filename)) as r:
reqs = r.read().strip().split("\n")
# Return non empty lines and non comments
return [r for r in reqs if re.match(r"^\w+", r)]
setup(
version="1.0.1",
package_data={"data": ["*.json"]},
include_package_data=True,
cmdclass={
"build_py": unasync.cmdclass_build_py(
rules=[
unasync.Rule(
"/apyhiveapi/",
"/pyhiveapi/",
additional_replacements={
"apyhiveapi": "pyhiveapi",
"asyncio": "threading",
},
),
unasync.Rule(
"/apyhiveapi/api/",
"/pyhiveapi/api/",
additional_replacements={
"apyhiveapi": "pyhiveapi",
},
),
]
)
},
install_requires=requirements_from_file(),
extras_require={"dev": requirements_from_file("requirements_test.txt")},
)