From fe69032cf4a69c5a06ba184e7bd06d53759ebaf9 Mon Sep 17 00:00:00 2001 From: Manuel Gunther Date: Wed, 2 Dec 2015 12:34:14 -0700 Subject: [PATCH] Switched to new namespace system --- bob/__init__.py | 5 +++-- bob/bio/__init__.py | 5 +++-- setup.py | 15 --------------- 3 files changed, 6 insertions(+), 19 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/bio/__init__.py b/bob/bio/__init__.py index 60381ea..2ab1e28 100644 --- a/bob/bio/__init__.py +++ b/bob/bio/__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 492be75..b04b31c 100644 --- a/setup.py +++ b/setup.py @@ -72,21 +72,6 @@ setup( # privileges when using buildout. install_requires = install_requires, - # Your project should be called something like 'bob.' or - # 'bob..'. To implement this correctly and still get all your - # packages to be imported w/o problems, you need to implement namespaces - # on the various levels of the package and declare them here. See more - # about this here: - # http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages - # - # Our database packages are 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.bio', - ], - # 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 # entry under 'console_scripts' is like this: -- 2.21.0