From 0fb00e8be51ba9fe6f147857e4323cb8eb555df9 Mon Sep 17 00:00:00 2001 From: Pavel Korshunov <pavel.korshunov@idiap.ch> Date: Thu, 19 Nov 2015 15:38:34 +0100 Subject: [PATCH] pkg_resources is replaces with pkgutil --- bob/__init__.py | 5 +++-- bob/ip/__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/ip/__init__.py b/bob/ip/__init__.py index 60381ea..2ab1e28 100644 --- a/bob/ip/__init__.py +++ b/bob/ip/__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 4aeb857..fa1d328 100644 --- a/setup.py +++ b/setup.py @@ -39,10 +39,7 @@ setup( setup_requires = build_requires, install_requires = build_requires, - namespace_packages=[ - "bob", - "bob.ip", - ], + ext_modules=[ Extension("bob.ip.flandmark.version", -- GitLab