Merge lp:~elopio/u1-test-utils/namespace into lp:u1-test-utils

Proposed by Leo Arias
Status: Rejected
Rejected by: Leo Arias
Proposed branch: lp:~elopio/u1-test-utils/namespace
Merge into: lp:u1-test-utils
Diff against target: 20 lines (+4/-0)
2 files modified
canonical/__init__.py (+3/-0)
setup.py (+1/-0)
To merge this branch: bzr merge lp:~elopio/u1-test-utils/namespace
Reviewer Review Type Date Requested Status
Online Services QA Pending
Canonical ISD hackers Pending
Review via email: mp+123866@code.launchpad.net

Commit message

Fixed the packaging details to allow other projects to use the canonical namespace.

Description of the change

Fixed the packaging details to allow other projects to use the canonical namespace.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

When I imported the new project for sso actions that uses the same canonical namespace, I couldn't import this one anymore. So, I added namespace_packages = ['canonical'] to the package and it started working again. But, this warning appeared:

    WARNING: canonical is a namespace package, but its __init__.py does
    not declare_namespace(); setuptools 0.7 will REQUIRE this!
    (See the setuptools manual under "Namespace Packages" for details.)

Following [1], I added declare_namespace to the __init__ file.

[1] http://packages.python.org/distribute/setuptools.html#namespace-packages+

Revision history for this message
Leo Arias (elopio) wrote :

We will not be using namespaces for the moment, so this is not required.

Unmerged revisions

16. By Leo Arias

Include the namespace package to the project's source tree.

15. By Leo Arias

Added the namespace package to the setup.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'canonical/__init__.py'
2--- canonical/__init__.py 2011-02-07 16:48:09 +0000
3+++ canonical/__init__.py 2012-09-12 00:27:20 +0000
4@@ -3,3 +3,6 @@
5
6 # denote package as namespace package
7 __path__ = extend_path(__path__, __name__)
8+
9+# Include the namespace package to the project's source tree.
10+__import__('pkg_resources').declare_namespace(__name__)
11
12=== modified file 'setup.py'
13--- setup.py 2011-02-08 20:15:31 +0000
14+++ setup.py 2012-09-12 00:27:20 +0000
15@@ -21,4 +21,5 @@
16 author_email='ricardo.kirkner@canonical.com',
17 packages=find_packages(),
18 include_package_data=True,
19+ namespace_packages = ['canonical']
20 )

Subscribers

People subscribed via source and target branches

to all changes: