From: Marc Schink Date: Thu, 12 Sep 2024 12:18:20 +0000 (+0200) Subject: bindings/python: Use implicit namespaces X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6669e08e02cc0cf65d292275cf40c822ea3d0048;p=libsigrok.git bindings/python: Use implicit namespaces The use of 'namespace_packages' is deprecated [1] and for Python >= 3.3, implicit/native namespaces should be used. There are no incompatibilities as we require Python >= 3.8. More details can be found in [2] and [3]. [1] https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages [2] https://packaging.python.org/en/latest/guides/packaging-namespace-packages/ [3] https://peps.python.org/pep-0420/ --- diff --git a/bindings/python/setup.py b/bindings/python/setup.py index dd8a3d7b..85422327 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -83,7 +83,6 @@ class build_ext(_build_ext): setup( name = 'libsigrok', - namespace_packages = ['sigrok'], packages = find_packages(srcdir), version = os.environ.get('VERSION'), description = "libsigrok API wrapper", diff --git a/bindings/python/sigrok/__init__.py b/bindings/python/sigrok/__init__.py index b1f900a4..8402e210 100644 --- a/bindings/python/sigrok/__init__.py +++ b/bindings/python/sigrok/__init__.py @@ -16,5 +16,3 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . ## - -__import__("pkg_resources").declare_namespace(__name__)