mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Removed dependency on the "zeroconf" package and install it only when a user lists mDNS devices (issue with zeroconf's LGPL license)
This commit is contained in:
@ -18,8 +18,8 @@ PlatformIO Core 6
|
||||
|
||||
* Added support for Python 3.11
|
||||
* Made assets (templates, ``99-platformio-udev.rules``) part of Python's module (`issue #4458 <https://github.com/platformio/platformio-core/issues/4458>`_)
|
||||
* Import the "zeroconf" module only when a user lists mDNS devices (issue with zeroconf's LGPL license)
|
||||
* Updated `Clang-Tidy <https://docs.platformio.org/en/latest/plus/check-tools/clang-tidy.html>`__ check tool to v15.0.5 with new diagnostics and bugfixes
|
||||
* Removed dependency on the "zeroconf" package and install it only when a user lists mDNS devices (issue with zeroconf's LGPL license)
|
||||
|
||||
6.1.5 (2022-11-01)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
@ -82,7 +82,15 @@ def list_logical_devices():
|
||||
|
||||
|
||||
def list_mdns_services():
|
||||
import zeroconf # pylint: disable=import-outside-toplevel
|
||||
try:
|
||||
import zeroconf # pylint: disable=import-outside-toplevel
|
||||
except ImportError:
|
||||
result = proc.exec_command(
|
||||
[proc.get_pythonexe_path(), "-m", "pip", "install", "zeroconf"]
|
||||
)
|
||||
if result.get("returncode") != 0:
|
||||
print(result.get("err"))
|
||||
import zeroconf # pylint: disable=import-outside-toplevel
|
||||
|
||||
class mDNSListener:
|
||||
def __init__(self):
|
||||
|
Reference in New Issue
Block a user