[Python-modules-team] Bug#709376: python-dap: Incomplete namespace_packages causes spurrious warning messages

Mike Neish neishm at atmosp.physics.utoronto.ca
Wed May 22 20:30:32 UTC 2013


Package: python-dap
Version: 2.2.6.7-1
Severity: minor
Tags: upstream patch

Dear Maintainer,

With python-dap installed, I get the following warning message:

Module dap was already imported from None, but 
/usr/lib/python2.7/dist-packages
is being added to sys.path

The easiest way to trigger this message is to run "import pkg_resources".

A gentoo bug report at https://bugs.gentoo.org/show_bug.cgi?id=54161#c29
suggests that the 'dap' package needs to be added to the top of
/usr/lib/python2.7/dist-packages//dap-2.2.6.7.egg-info/namespace_packages.txt
(or whatever the equivalent location is).

The easiest way to fix this is to change the 'namespace_packages' parameter
being used in setup.py, in the Debian source package.

I've attached a patch which adds the root 'dap' package to 
namespace_package.
This fixes the warning message in my local tests.

Thanks,
Mike



-- System Information:
Debian Release: wheezy/sid
   APT prefers precise-updates
   APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-43-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-dap depends on:
ii  python           2.7.3-0ubuntu2
ii  python-httplib2  0.7.2-1ubuntu2
ii  python2.7        2.7.3-0ubuntu3.1

Versions of packages python-dap recommends:
pn  python-cheetah      <none>
pn  python-paste        <none>
pn  python-pastedeploy  <none>
pn  python-pastescript  <none>

python-dap suggests no packages.




*** 
/home/neish/test_source/pydap-2.2.6.7/debian/patches/fix_namespace_packages
--- pydap-2.2.6.7.orig/setup.py
+++ pydap-2.2.6.7/setup.py
@@ -59,7 +59,7 @@ The latest version is available in a `Su
        url='http://pydap.org/',
        license='MIT',
        packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
-      namespace_packages=['dap.plugins', 'dap.responses'],
+      namespace_packages=['dap', 'dap.plugins', 'dap.responses'],
        include_package_data=True,



More information about the Python-modules-team mailing list