# Copyright (c) 2016, 2018 Claudiu Popa # Copyright (c) 2021 Pierre Sassoulas # Copyright (c) 2021 Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> # Copyright (c) 2021 Neil Girdhar try: import pkg_resources except ImportError: pkg_resources = None # type: ignore[assignment] def is_namespace(modname): return ( pkg_resources is not None and hasattr(pkg_resources, "_namespace_packages") and modname in pkg_resources._namespace_packages )