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:
Ivan Kravets
2023-01-13 19:09:19 +02:00
parent d43c5696cc
commit 20067c5736
3 changed files with 10 additions and 3 deletions

View File

@ -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)
~~~~~~~~~~~~~~~~~~

View File

@ -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):

View File

@ -39,7 +39,6 @@ minimal_requirements = [
"requests==%s" % ("2.27.1" if PY36 else "2.*"),
"semantic_version==2.10.*",
"tabulate==%s" % ("0.8.10" if PY36 else "0.9.*"),
"zeroconf<1",
]
home_requirements = [