Skip to content

Add namespace package mpl_toolkits to package meta-data #2210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
# These are distutils.setup parameters that the various packages add
# things to.
packages = []
namespace_packages = []
py_modules = []
ext_modules = []
package_data = {}
Expand Down Expand Up @@ -177,6 +178,7 @@
if isinstance(package, str):
continue
packages.extend(package.get_packages())
namespace_packages.extend(package.get_namespace_packages())
py_modules.extend(package.get_py_modules())
ext = package.get_extension()
if ext is not None:
Expand Down Expand Up @@ -220,6 +222,7 @@
""",
license="BSD",
packages=packages,
namespace_packages = namespace_packages,
platforms='any',
py_modules=py_modules,
ext_modules=ext_modules,
Expand Down
12 changes: 12 additions & 0 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,15 @@ def get_packages(self):
"""
return []

def get_namespace_packages(self):
"""
Get a list of namespace package names to add to the configuration.
These are added to the `namespace_packages` list passed to
`distutils.setup`.
"""
return []


def get_py_modules(self):
"""
Get a list of top-level modules to add to the configuration.
Expand Down Expand Up @@ -576,6 +585,9 @@ def get_packages(self):
'mpl_toolkits.axisartist',
]

def get_namespace_packages(self):
return ['mpl_toolkits']


class Tests(OptionalPackage):
name = "tests"
Expand Down