diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-15 03:49:38 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-15 03:49:38 +0000 |
| commit | 826e0a5a4430a744a080bb82884f8892c880fbdd (patch) | |
| tree | db0177a1ee768b56977094fbeb59c9b727e2c1bb /python-solax.spec | |
| parent | d23283e5a82a1c9f160115a2948cf63dc7e68090 (diff) | |
automatic import of python-solax
Diffstat (limited to 'python-solax.spec')
| -rw-r--r-- | python-solax.spec | 189 |
1 files changed, 189 insertions, 0 deletions
diff --git a/python-solax.spec b/python-solax.spec new file mode 100644 index 0000000..5247262 --- /dev/null +++ b/python-solax.spec @@ -0,0 +1,189 @@ +%global _empty_manifest_terminate_build 0 +Name: python-solax +Version: 0.3.0 +Release: 1 +Summary: Solax inverter API client +License: MIT +URL: https://github.com/squishykid/solax +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b9/d5/770418642d29c22183718f3ddecf03184b548e65727bf81973d4dcbfca75/solax-0.3.0.tar.gz +BuildArch: noarch + +Requires: python3-aiohttp +Requires: python3-async-timeout +Requires: python3-voluptuous + +%description +# Solax + +[](https://github.com/squishykid/solax/actions) +[](https://pypi.org/project/solax) + +Read energy usage data from the real-time API on Solax solar inverters. + +* Real time power, current and voltage +* Grid power information +* Battery level +* Temperature and inverter health +* Daily/Total energy summaries + +## Usage + +`pip install solax` + +Then from within your project: + +``` +import solax +import asyncio + +async def work(): + r = await solax.real_time_api('10.0.0.1') + return await r.get_data() + +loop = asyncio.new_event_loop() +asyncio.set_event_loop(loop) +data = loop.run_until_complete(work()) +print(data) +``` + +## Confirmed Supported Inverters + +These inverters have been tested and confirmed to be working. If your inverter is not listed below, this library may still work- please create an issue so we can add your inverter to the list 😊. + +* SK-TL5000E + + +%package -n python3-solax +Summary: Solax inverter API client +Provides: python-solax +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-solax +# Solax + +[](https://github.com/squishykid/solax/actions) +[](https://pypi.org/project/solax) + +Read energy usage data from the real-time API on Solax solar inverters. + +* Real time power, current and voltage +* Grid power information +* Battery level +* Temperature and inverter health +* Daily/Total energy summaries + +## Usage + +`pip install solax` + +Then from within your project: + +``` +import solax +import asyncio + +async def work(): + r = await solax.real_time_api('10.0.0.1') + return await r.get_data() + +loop = asyncio.new_event_loop() +asyncio.set_event_loop(loop) +data = loop.run_until_complete(work()) +print(data) +``` + +## Confirmed Supported Inverters + +These inverters have been tested and confirmed to be working. If your inverter is not listed below, this library may still work- please create an issue so we can add your inverter to the list 😊. + +* SK-TL5000E + + +%package help +Summary: Development documents and examples for solax +Provides: python3-solax-doc +%description help +# Solax + +[](https://github.com/squishykid/solax/actions) +[](https://pypi.org/project/solax) + +Read energy usage data from the real-time API on Solax solar inverters. + +* Real time power, current and voltage +* Grid power information +* Battery level +* Temperature and inverter health +* Daily/Total energy summaries + +## Usage + +`pip install solax` + +Then from within your project: + +``` +import solax +import asyncio + +async def work(): + r = await solax.real_time_api('10.0.0.1') + return await r.get_data() + +loop = asyncio.new_event_loop() +asyncio.set_event_loop(loop) +data = loop.run_until_complete(work()) +print(data) +``` + +## Confirmed Supported Inverters + +These inverters have been tested and confirmed to be working. If your inverter is not listed below, this library may still work- please create an issue so we can add your inverter to the list 😊. + +* SK-TL5000E + + +%prep +%autosetup -n solax-0.3.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-solax -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.0-1 +- Package Spec generated |
