%global _empty_manifest_terminate_build 0 Name: python-AirzoneCloud Version: 1.2.2 Release: 1 Summary: Python3 library for Airzone Cloud API License: MIT License URL: https://github.com/max13fr/AirzoneCloud Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e0/6b/7d41c51c0fc3c683840b084ca87c792554fc1eacbbb7d5e083375ca27bc0/AirzoneCloud-1.2.2.tar.gz BuildArch: noarch %description # Airzone Cloud - [Airzone Cloud](#airzone-cloud) - [Presentation](#presentation) - [Abstract](#abstract) - [Module classes](#module-classes) - [Usage](#usage) - [Install](#install) - [Start API](#start-api) - [Get installations](#get-installations) - [Get installations](#get-installations-1) - [Get groups for each installation](#get-groups-for-each-installation) - [Get devices for each grou of each installation](#get-devices-for-each-grou-of-each-installation) - [Get all devices from all installations shortcut](#get-all-devices-from-all-installations-shortcut) - [Control a device](#control-a-device) - [HVAC mode](#hvac-mode) - [Available modes](#available-modes) - [List supported modes for each devices](#list-supported-modes-for-each-devices) - [Set HVAC mode on a master thermostat device (and all linked thermostats)](#set-hvac-mode-on-a-master-thermostat-device-and-all-linked-thermostats) - [API documentation](#api-documentation) - [Tests](#tests) - [Update configuration in config_test.json](#update-configuration-in-config_testjson) - [Run test script](#run-test-script) ## Presentation ### Abstract Allow to communicate easily with Airzone Cloud to retrieve information or to send commands (on/off, temperature, HVAC mode, ...) This library manage the main Airzone Cloud API (try to connect to [www.airzonecloud.com](https://www.airzonecloud.com) to be sure). Official API documentation is available here : https://developers.airzonecloud.com/docs/web-api/ ### Module classes - **AirzoneCloud** : represent your AirzoneCloud account. Contains a list of your **installations** : - **Installation**: represent one of your installation (like your home, an office, ...). Contains a list of its **groups** : - **Group** : represent a group of **devices** in the installation - **Device** : represent your thermostat to control ![Airzonecloud tree elements](airzonecloud_tree_elements.png) ## Usage ### Install ```bash pip3 install AirzoneCloud ``` ### Start API ```python from AirzoneCloud import AirzoneCloud api = AirzoneCloud("email@domain.com", "password") ``` ### Get installations ```python for installation in api.installations: print( "Installation(name={}, access_type={}, ws_ids=[{}], id={})".format( installation.name, installation.access_type, ", ".join(installation.ws_ids), installation.id ) ) ``` Output :
Installation(name=Home, access_type=admin, ws_ids=[AA:BB:CC:DD:EE:FF], id=60f5cb990123456789abdcef)
### Get installations ```python for installation in api.installations: print( "Installation(name={}, access_type={}, ws_ids=[{}], id={})".format( installation.name, installation.access_type, ", ".join(installation.ws_ids), installation.id ) ) ``` Output :
Installation(name=Home, access_type=admin, ws_ids=[AA:BB:CC:DD:EE:FF], id=60f5cb990123456789abdcef)
### Get groups for each installation ```python for installation in api.installations: print(installation) for group in installation.groups: print( " Group(name={}, installation={}, id={})".format( group.name, group.installation.name, group.id ) ) ``` Output :
Installation(name=Home)
  Group(name=System 1, installation=Home, id=60f5cb990123456789abdce0)
### Get devices for each grou of each installation ```python for installation in api.installations: print(installation) for group in installation.groups: print(" " + str(group)) for device in group.devices: print( " Device(name={}, is_connected={}, is_on={}, mode={}, current_temp={}, target_temp={}, id={}, ws_id={})".format( device.name, device.is_connected, device.is_on, device.mode, device.current_temperature, device.target_temperature, device.id, device.ws_id, ) ) ``` Output :
Installation(name=Home)
  Group(name=System 1, installation=Home)
    Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.9, target_temp=20.0, id=60f5cb990123456789abdce1, ws_id=AA:BB:CC:DD:EE:FF)
    Device(name=Ch parents, is_connected=True, is_on=False, mode=heating, current_temp=17.2, target_temp=18.0, id=60f5cb990123456789abdce2, ws_id=AA:BB:CC:DD:EE:FF)
    Device(name=Ch bebe, is_connected=True, is_on=False, mode=heating, current_temp=18.6, target_temp=19.5, id=60f5cb990123456789abdce3, ws_id=AA:BB:CC:DD:EE:FF)
### Get all devices from all installations shortcut ```python for device in api.all_devices: print( "Device(name={}, is_on={}, mode={}, current_temp={}, target_temp={}, id={})".format( device.name, device.is_on, device.mode, device.current_temperature, device.target_temperature, device.id, ) ) ``` Output :
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.9, target_temp=20.0, id=60f5cb990123456789abdce1, ws_id=AA:BB:CC:DD:EE:FF)
Device(name=Ch parents, is_connected=True, is_on=False, mode=heating, current_temp=17.2, target_temp=18.0, id=60f5cb990123456789abdce2, ws_id=AA:BB:CC:DD:EE:FF)
Device(name=Ch bebe, is_connected=True, is_on=False, mode=heating, current_temp=18.6, target_temp=19.5, id=60f5cb990123456789abdce3, ws_id=AA:BB:CC:DD:EE:FF)
### Control a device All actions by default are waiting 1 second then refresh the device. You can disable this behavior by adding auto_refresh=False. ```python # get first device device = api.all_devices[0] print(device) # start device & set temperature device.turn_on(auto_refresh=False).set_temperature(22) print(device) # stopping device device.turn_off() print(device) ``` Output :
Device(name=Salon, is_connected=True, is_on=False, mode=heating, current_temp=20.8, target_temp=20.0)
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.8, target_temp=22.0)
Device(name=Salon, is_connected=True, is_on=False, mode=heating, current_temp=20.8, target_temp=22.0)
### HVAC mode #### Available modes - **stop** : Stop mode - **auto** : Automatic mode - **cooling** : Cooling mode - **heating** : Heating mode - **ventilation** : Ventilation mode - **dehumidify** : Dehumidifier / Dry mode - **emergency-heating** : Emergency heat mode - **air-heating** : Heat air mode (only compatible systems) - **radiant-heating** : Heat radiant mode (only compatible systems) - **combined-heating** : Heat combined mode (only compatible systems) - **air-cooling** : Cooling air mode (only compatible systems) - **radiant-cooling** : Cooling radiant mode (only compatible systems) - **combined-cooling** : Cooling combined mode (only compatible systems) Only master thermostat device can update the mode. #### List supported modes for each devices ```python for device in api.all_devices: print( "Device(name={}, mode={}, modes_availables={})".format( device.name, device.mode, device.modes_availables, ) ) ``` Output :
Device(name=Salon, mode=heating, modes_availables=['cooling', 'heating', 'ventilation', 'dehumidify', 'stop'])
Device(name=Ch parents, mode=heating, modes_availables=[])
Device(name=Ch bebe, mode=heating, modes_availables=[])
If modes_availables is an empty list, your device is not the master thermostat. #### Set HVAC mode on a master thermostat device (and all linked thermostats) ```python device = api.all_devices[0] print(device) # set mode to cooling device.set_mode("cooling") print(device) ``` Output :
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.8, target_temp=20.0)
Device(name=Salon, is_connected=True, is_on=True, mode=cooling, current_temp=20.8, target_temp=20.0)
## API documentation [API full doc](API.md) ## Tests ### Update configuration in config_test.json - **email** : used to log-in to you AirzoneCloud account (default to *changeme@example.com*) - **password** : used to log-in to you AirzoneCloud account (default to *changeme*) - **log_level** : minimum level of log to display : DEBUG | INFO | WARNING | ERROR | CRITICIAL (default to *INFO*) - **display_group_properties** : display all properties for each group (default to *true*). - **display_device_properties** : display all properties for each device (default to *true*). - **display_api_token** : ask to display token used to connect to the AirzoneCloud API (default to *false*). Useful for https://developers.airzonecloud.com/docs/web-api/ - **refresh_before_display** : ask to call all refresh functions before displaying for test purpose (default to *false*). ### Run test script ```bash ./test.py ``` %package -n python3-AirzoneCloud Summary: Python3 library for Airzone Cloud API Provides: python-AirzoneCloud BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-AirzoneCloud # Airzone Cloud - [Airzone Cloud](#airzone-cloud) - [Presentation](#presentation) - [Abstract](#abstract) - [Module classes](#module-classes) - [Usage](#usage) - [Install](#install) - [Start API](#start-api) - [Get installations](#get-installations) - [Get installations](#get-installations-1) - [Get groups for each installation](#get-groups-for-each-installation) - [Get devices for each grou of each installation](#get-devices-for-each-grou-of-each-installation) - [Get all devices from all installations shortcut](#get-all-devices-from-all-installations-shortcut) - [Control a device](#control-a-device) - [HVAC mode](#hvac-mode) - [Available modes](#available-modes) - [List supported modes for each devices](#list-supported-modes-for-each-devices) - [Set HVAC mode on a master thermostat device (and all linked thermostats)](#set-hvac-mode-on-a-master-thermostat-device-and-all-linked-thermostats) - [API documentation](#api-documentation) - [Tests](#tests) - [Update configuration in config_test.json](#update-configuration-in-config_testjson) - [Run test script](#run-test-script) ## Presentation ### Abstract Allow to communicate easily with Airzone Cloud to retrieve information or to send commands (on/off, temperature, HVAC mode, ...) This library manage the main Airzone Cloud API (try to connect to [www.airzonecloud.com](https://www.airzonecloud.com) to be sure). Official API documentation is available here : https://developers.airzonecloud.com/docs/web-api/ ### Module classes - **AirzoneCloud** : represent your AirzoneCloud account. Contains a list of your **installations** : - **Installation**: represent one of your installation (like your home, an office, ...). Contains a list of its **groups** : - **Group** : represent a group of **devices** in the installation - **Device** : represent your thermostat to control ![Airzonecloud tree elements](airzonecloud_tree_elements.png) ## Usage ### Install ```bash pip3 install AirzoneCloud ``` ### Start API ```python from AirzoneCloud import AirzoneCloud api = AirzoneCloud("email@domain.com", "password") ``` ### Get installations ```python for installation in api.installations: print( "Installation(name={}, access_type={}, ws_ids=[{}], id={})".format( installation.name, installation.access_type, ", ".join(installation.ws_ids), installation.id ) ) ``` Output :
Installation(name=Home, access_type=admin, ws_ids=[AA:BB:CC:DD:EE:FF], id=60f5cb990123456789abdcef)
### Get installations ```python for installation in api.installations: print( "Installation(name={}, access_type={}, ws_ids=[{}], id={})".format( installation.name, installation.access_type, ", ".join(installation.ws_ids), installation.id ) ) ``` Output :
Installation(name=Home, access_type=admin, ws_ids=[AA:BB:CC:DD:EE:FF], id=60f5cb990123456789abdcef)
### Get groups for each installation ```python for installation in api.installations: print(installation) for group in installation.groups: print( " Group(name={}, installation={}, id={})".format( group.name, group.installation.name, group.id ) ) ``` Output :
Installation(name=Home)
  Group(name=System 1, installation=Home, id=60f5cb990123456789abdce0)
### Get devices for each grou of each installation ```python for installation in api.installations: print(installation) for group in installation.groups: print(" " + str(group)) for device in group.devices: print( " Device(name={}, is_connected={}, is_on={}, mode={}, current_temp={}, target_temp={}, id={}, ws_id={})".format( device.name, device.is_connected, device.is_on, device.mode, device.current_temperature, device.target_temperature, device.id, device.ws_id, ) ) ``` Output :
Installation(name=Home)
  Group(name=System 1, installation=Home)
    Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.9, target_temp=20.0, id=60f5cb990123456789abdce1, ws_id=AA:BB:CC:DD:EE:FF)
    Device(name=Ch parents, is_connected=True, is_on=False, mode=heating, current_temp=17.2, target_temp=18.0, id=60f5cb990123456789abdce2, ws_id=AA:BB:CC:DD:EE:FF)
    Device(name=Ch bebe, is_connected=True, is_on=False, mode=heating, current_temp=18.6, target_temp=19.5, id=60f5cb990123456789abdce3, ws_id=AA:BB:CC:DD:EE:FF)
### Get all devices from all installations shortcut ```python for device in api.all_devices: print( "Device(name={}, is_on={}, mode={}, current_temp={}, target_temp={}, id={})".format( device.name, device.is_on, device.mode, device.current_temperature, device.target_temperature, device.id, ) ) ``` Output :
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.9, target_temp=20.0, id=60f5cb990123456789abdce1, ws_id=AA:BB:CC:DD:EE:FF)
Device(name=Ch parents, is_connected=True, is_on=False, mode=heating, current_temp=17.2, target_temp=18.0, id=60f5cb990123456789abdce2, ws_id=AA:BB:CC:DD:EE:FF)
Device(name=Ch bebe, is_connected=True, is_on=False, mode=heating, current_temp=18.6, target_temp=19.5, id=60f5cb990123456789abdce3, ws_id=AA:BB:CC:DD:EE:FF)
### Control a device All actions by default are waiting 1 second then refresh the device. You can disable this behavior by adding auto_refresh=False. ```python # get first device device = api.all_devices[0] print(device) # start device & set temperature device.turn_on(auto_refresh=False).set_temperature(22) print(device) # stopping device device.turn_off() print(device) ``` Output :
Device(name=Salon, is_connected=True, is_on=False, mode=heating, current_temp=20.8, target_temp=20.0)
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.8, target_temp=22.0)
Device(name=Salon, is_connected=True, is_on=False, mode=heating, current_temp=20.8, target_temp=22.0)
### HVAC mode #### Available modes - **stop** : Stop mode - **auto** : Automatic mode - **cooling** : Cooling mode - **heating** : Heating mode - **ventilation** : Ventilation mode - **dehumidify** : Dehumidifier / Dry mode - **emergency-heating** : Emergency heat mode - **air-heating** : Heat air mode (only compatible systems) - **radiant-heating** : Heat radiant mode (only compatible systems) - **combined-heating** : Heat combined mode (only compatible systems) - **air-cooling** : Cooling air mode (only compatible systems) - **radiant-cooling** : Cooling radiant mode (only compatible systems) - **combined-cooling** : Cooling combined mode (only compatible systems) Only master thermostat device can update the mode. #### List supported modes for each devices ```python for device in api.all_devices: print( "Device(name={}, mode={}, modes_availables={})".format( device.name, device.mode, device.modes_availables, ) ) ``` Output :
Device(name=Salon, mode=heating, modes_availables=['cooling', 'heating', 'ventilation', 'dehumidify', 'stop'])
Device(name=Ch parents, mode=heating, modes_availables=[])
Device(name=Ch bebe, mode=heating, modes_availables=[])
If modes_availables is an empty list, your device is not the master thermostat. #### Set HVAC mode on a master thermostat device (and all linked thermostats) ```python device = api.all_devices[0] print(device) # set mode to cooling device.set_mode("cooling") print(device) ``` Output :
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.8, target_temp=20.0)
Device(name=Salon, is_connected=True, is_on=True, mode=cooling, current_temp=20.8, target_temp=20.0)
## API documentation [API full doc](API.md) ## Tests ### Update configuration in config_test.json - **email** : used to log-in to you AirzoneCloud account (default to *changeme@example.com*) - **password** : used to log-in to you AirzoneCloud account (default to *changeme*) - **log_level** : minimum level of log to display : DEBUG | INFO | WARNING | ERROR | CRITICIAL (default to *INFO*) - **display_group_properties** : display all properties for each group (default to *true*). - **display_device_properties** : display all properties for each device (default to *true*). - **display_api_token** : ask to display token used to connect to the AirzoneCloud API (default to *false*). Useful for https://developers.airzonecloud.com/docs/web-api/ - **refresh_before_display** : ask to call all refresh functions before displaying for test purpose (default to *false*). ### Run test script ```bash ./test.py ``` %package help Summary: Development documents and examples for AirzoneCloud Provides: python3-AirzoneCloud-doc %description help # Airzone Cloud - [Airzone Cloud](#airzone-cloud) - [Presentation](#presentation) - [Abstract](#abstract) - [Module classes](#module-classes) - [Usage](#usage) - [Install](#install) - [Start API](#start-api) - [Get installations](#get-installations) - [Get installations](#get-installations-1) - [Get groups for each installation](#get-groups-for-each-installation) - [Get devices for each grou of each installation](#get-devices-for-each-grou-of-each-installation) - [Get all devices from all installations shortcut](#get-all-devices-from-all-installations-shortcut) - [Control a device](#control-a-device) - [HVAC mode](#hvac-mode) - [Available modes](#available-modes) - [List supported modes for each devices](#list-supported-modes-for-each-devices) - [Set HVAC mode on a master thermostat device (and all linked thermostats)](#set-hvac-mode-on-a-master-thermostat-device-and-all-linked-thermostats) - [API documentation](#api-documentation) - [Tests](#tests) - [Update configuration in config_test.json](#update-configuration-in-config_testjson) - [Run test script](#run-test-script) ## Presentation ### Abstract Allow to communicate easily with Airzone Cloud to retrieve information or to send commands (on/off, temperature, HVAC mode, ...) This library manage the main Airzone Cloud API (try to connect to [www.airzonecloud.com](https://www.airzonecloud.com) to be sure). Official API documentation is available here : https://developers.airzonecloud.com/docs/web-api/ ### Module classes - **AirzoneCloud** : represent your AirzoneCloud account. Contains a list of your **installations** : - **Installation**: represent one of your installation (like your home, an office, ...). Contains a list of its **groups** : - **Group** : represent a group of **devices** in the installation - **Device** : represent your thermostat to control ![Airzonecloud tree elements](airzonecloud_tree_elements.png) ## Usage ### Install ```bash pip3 install AirzoneCloud ``` ### Start API ```python from AirzoneCloud import AirzoneCloud api = AirzoneCloud("email@domain.com", "password") ``` ### Get installations ```python for installation in api.installations: print( "Installation(name={}, access_type={}, ws_ids=[{}], id={})".format( installation.name, installation.access_type, ", ".join(installation.ws_ids), installation.id ) ) ``` Output :
Installation(name=Home, access_type=admin, ws_ids=[AA:BB:CC:DD:EE:FF], id=60f5cb990123456789abdcef)
### Get installations ```python for installation in api.installations: print( "Installation(name={}, access_type={}, ws_ids=[{}], id={})".format( installation.name, installation.access_type, ", ".join(installation.ws_ids), installation.id ) ) ``` Output :
Installation(name=Home, access_type=admin, ws_ids=[AA:BB:CC:DD:EE:FF], id=60f5cb990123456789abdcef)
### Get groups for each installation ```python for installation in api.installations: print(installation) for group in installation.groups: print( " Group(name={}, installation={}, id={})".format( group.name, group.installation.name, group.id ) ) ``` Output :
Installation(name=Home)
  Group(name=System 1, installation=Home, id=60f5cb990123456789abdce0)
### Get devices for each grou of each installation ```python for installation in api.installations: print(installation) for group in installation.groups: print(" " + str(group)) for device in group.devices: print( " Device(name={}, is_connected={}, is_on={}, mode={}, current_temp={}, target_temp={}, id={}, ws_id={})".format( device.name, device.is_connected, device.is_on, device.mode, device.current_temperature, device.target_temperature, device.id, device.ws_id, ) ) ``` Output :
Installation(name=Home)
  Group(name=System 1, installation=Home)
    Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.9, target_temp=20.0, id=60f5cb990123456789abdce1, ws_id=AA:BB:CC:DD:EE:FF)
    Device(name=Ch parents, is_connected=True, is_on=False, mode=heating, current_temp=17.2, target_temp=18.0, id=60f5cb990123456789abdce2, ws_id=AA:BB:CC:DD:EE:FF)
    Device(name=Ch bebe, is_connected=True, is_on=False, mode=heating, current_temp=18.6, target_temp=19.5, id=60f5cb990123456789abdce3, ws_id=AA:BB:CC:DD:EE:FF)
### Get all devices from all installations shortcut ```python for device in api.all_devices: print( "Device(name={}, is_on={}, mode={}, current_temp={}, target_temp={}, id={})".format( device.name, device.is_on, device.mode, device.current_temperature, device.target_temperature, device.id, ) ) ``` Output :
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.9, target_temp=20.0, id=60f5cb990123456789abdce1, ws_id=AA:BB:CC:DD:EE:FF)
Device(name=Ch parents, is_connected=True, is_on=False, mode=heating, current_temp=17.2, target_temp=18.0, id=60f5cb990123456789abdce2, ws_id=AA:BB:CC:DD:EE:FF)
Device(name=Ch bebe, is_connected=True, is_on=False, mode=heating, current_temp=18.6, target_temp=19.5, id=60f5cb990123456789abdce3, ws_id=AA:BB:CC:DD:EE:FF)
### Control a device All actions by default are waiting 1 second then refresh the device. You can disable this behavior by adding auto_refresh=False. ```python # get first device device = api.all_devices[0] print(device) # start device & set temperature device.turn_on(auto_refresh=False).set_temperature(22) print(device) # stopping device device.turn_off() print(device) ``` Output :
Device(name=Salon, is_connected=True, is_on=False, mode=heating, current_temp=20.8, target_temp=20.0)
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.8, target_temp=22.0)
Device(name=Salon, is_connected=True, is_on=False, mode=heating, current_temp=20.8, target_temp=22.0)
### HVAC mode #### Available modes - **stop** : Stop mode - **auto** : Automatic mode - **cooling** : Cooling mode - **heating** : Heating mode - **ventilation** : Ventilation mode - **dehumidify** : Dehumidifier / Dry mode - **emergency-heating** : Emergency heat mode - **air-heating** : Heat air mode (only compatible systems) - **radiant-heating** : Heat radiant mode (only compatible systems) - **combined-heating** : Heat combined mode (only compatible systems) - **air-cooling** : Cooling air mode (only compatible systems) - **radiant-cooling** : Cooling radiant mode (only compatible systems) - **combined-cooling** : Cooling combined mode (only compatible systems) Only master thermostat device can update the mode. #### List supported modes for each devices ```python for device in api.all_devices: print( "Device(name={}, mode={}, modes_availables={})".format( device.name, device.mode, device.modes_availables, ) ) ``` Output :
Device(name=Salon, mode=heating, modes_availables=['cooling', 'heating', 'ventilation', 'dehumidify', 'stop'])
Device(name=Ch parents, mode=heating, modes_availables=[])
Device(name=Ch bebe, mode=heating, modes_availables=[])
If modes_availables is an empty list, your device is not the master thermostat. #### Set HVAC mode on a master thermostat device (and all linked thermostats) ```python device = api.all_devices[0] print(device) # set mode to cooling device.set_mode("cooling") print(device) ``` Output :
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.8, target_temp=20.0)
Device(name=Salon, is_connected=True, is_on=True, mode=cooling, current_temp=20.8, target_temp=20.0)
## API documentation [API full doc](API.md) ## Tests ### Update configuration in config_test.json - **email** : used to log-in to you AirzoneCloud account (default to *changeme@example.com*) - **password** : used to log-in to you AirzoneCloud account (default to *changeme*) - **log_level** : minimum level of log to display : DEBUG | INFO | WARNING | ERROR | CRITICIAL (default to *INFO*) - **display_group_properties** : display all properties for each group (default to *true*). - **display_device_properties** : display all properties for each device (default to *true*). - **display_api_token** : ask to display token used to connect to the AirzoneCloud API (default to *false*). Useful for https://developers.airzonecloud.com/docs/web-api/ - **refresh_before_display** : ask to call all refresh functions before displaying for test purpose (default to *false*). ### Run test script ```bash ./test.py ``` %prep %autosetup -n AirzoneCloud-1.2.2 %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-AirzoneCloud -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 1.2.2-1 - Package Spec generated