-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
60 lines (51 loc) · 1.68 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
"""Setup lib-elro-connects."""
import os
import re
import sys
from setuptools import setup, find_packages
def get_version(package):
"""
Return package version as listed in `__version__` in `__init__.py`.
"""
path = os.path.join(os.path.dirname(__file__), package, "__init__.py")
with open(path, "rb") as file:
init_py = file.read().decode("utf-8")
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
if sys.version_info < (3, 8):
sys.exit("Sorry, Python versions < 3.8 are not supported")
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
install_requires = []
setup(
name="lib-elro-connects",
version=get_version("elro"),
license="MIT Licence",
author="Jan Bouwhuis",
author_email="[email protected]",
description="Elro Connects P1 API",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/jbouwh/lib-elro-connects",
# package_dir={"": ""},
packages=find_packages(where="elro"),
data_files=[
(
"share/lib-elro-connects",
[
"examples/fire_alarm_demo.py",
"examples/cloud_login_demo.py",
"examples/socket_demo.py",
],
)
],
classifiers=[
"Development Status :: 4 - Beta",
"Topic :: Home Automation",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.9",
install_requires=install_requires,
scripts=[],
)