From 377a28f98da304e5e7c463e429e17a2c1edfb9b1 Mon Sep 17 00:00:00 2001 From: Pavel Korshunov <pavel.korshunov@idiap.ch> Date: Thu, 19 Nov 2015 15:38:33 +0100 Subject: [PATCH] pkg_resources is replaces with pkgutil --- bob/__init__.py | 5 +++-- bob/example/__init__.py | 5 +++-- setup.py | 5 +---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bob/__init__.py b/bob/__init__.py index 60381ea..2ab1e28 100644 --- a/bob/__init__.py +++ b/bob/__init__.py @@ -1,2 +1,3 @@ -#see http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages -__import__('pkg_resources').declare_namespace(__name__) +# see https://docs.python.org/3/library/pkgutil.html +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) diff --git a/bob/example/__init__.py b/bob/example/__init__.py index 60381ea..2ab1e28 100644 --- a/bob/example/__init__.py +++ b/bob/example/__init__.py @@ -1,2 +1,3 @@ -#see http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages -__import__('pkg_resources').declare_namespace(__name__) +# see https://docs.python.org/3/library/pkgutil.html +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) diff --git a/setup.py b/setup.py index 7896b08..934a84e 100644 --- a/setup.py +++ b/setup.py @@ -61,10 +61,7 @@ setup( # This package is good examples of namespace implementations # using several layers. You can check them out here: # https://github.com/idiap/bob/wiki/Satellite-Packages - namespace_packages = [ - 'bob', - 'bob.example', - ], + # This entry defines which scripts you will have inside the 'bin' directory # once you install the package (or run 'bin/buildout'). The order of each -- GitLab