]> sigrok.org Git - libsigrok.git/commitdiff
bindings/python: Use implicit namespaces
authorMarc Schink <redacted>
Thu, 12 Sep 2024 12:18:20 +0000 (14:18 +0200)
committerSoeren Apel <redacted>
Mon, 30 Sep 2024 21:43:14 +0000 (23:43 +0200)
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/

bindings/python/setup.py
bindings/python/sigrok/__init__.py

index dd8a3d7b9f48c4a12e661bc261bc3e66d5218f8d..8542232736c5e8bfa157d5dde24ee9d261a1bc4c 100644 (file)
@@ -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",
index b1f900a4530de83bd8073fdf525770e96719cf01..8402e2101a7de14a57a0f369b6ecbdd8a7c8168f 100644 (file)
@@ -16,5 +16,3 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ##
-
-__import__("pkg_resources").declare_namespace(__name__)