forked from jasonacox/pypowerwall
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
53 lines (50 loc) · 1.73 KB
/
setup.py
File metadata and controls
53 lines (50 loc) · 1.73 KB
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
import setuptools
import os
import re
# Read version_tuple from pypowerwall/__init__.py and construct __version__
version_file = os.path.join(os.path.dirname(__file__), 'pypowerwall', '__init__.py')
with open(version_file, 'r') as f:
version_content = f.read()
match = re.search(r"^version_tuple\s*=\s*\(([^)]*)\)", version_content, re.MULTILINE)
if match:
version_tuple = tuple(int(x.strip()) for x in match.group(1).split(','))
__version__ = '%d.%d.%d' % version_tuple
else:
raise RuntimeError('Unable to find version_tuple string in pypowerwall/__init__.py')
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="pypowerwall",
version=__version__,
author="Jason Cox",
author_email="jason@jasonacox.com",
description="Python module to access Tesla Energy Gateway for Powerwall and solar power data",
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/jasonacox/pypowerwall',
packages=setuptools.find_packages(),
install_requires=[
'requests',
'protobuf>=3.20.0',
'python-dotenv',
'pyroute2',
'bs4',
'python-dateutil',
'requests-oauthlib',
'websocket-client>=0.59.0',
],
package_data={
'pypowerwall.cloud.teslapy': ['endpoints.json', 'option_codes.json'],
},
include_package_data=True,
entry_points={
'console_scripts': [
'pypowerwall=pypowerwall.__main__:main',
],
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)