Questions tagged [namespace-package]

In Python, namespace packages have subpackages different locations. It allows different projects to use the same package name.

Namespace packages are Python packages whose subpackages are in different directories.

It allows different projects to use the same package. For example, many components of are developed in different projects with different release cycles. Yet, all of them are expected to be imported from a submodule of a zope package. Without namespace packages, it would be impossible: Python does not allow a package to have its code in multiple locations.

provides namespace packages. PEP 420 proposes a way of adding it into Python 3.3.

More can be found in setuptools documentation.

49 questions
0
votes
2 answers

python namespaces vs packages: making a package the default namespace

I have a project with an overarching namespace, with packages inside it. Here's the folder structure: pypackage ├── pypackage <-- Source code for use in this project. | | │ ├── bin <-- Module: Cli entry point into…
MetaStack
  • 3,266
  • 4
  • 30
  • 67
0
votes
1 answer

"python setup.py build_sphinx" and "sphinx-apidoc --implicit-namespaces"

sphinx-apidoc supports the option --implicit-namespaces to handle namespace packages according to PEP420. When I create the Sphinx documentation with "python setup.py build_sphinx", this does not work with namespace packages by default. Is there a…
0
votes
1 answer

Namespace package conflict

I have a package that I'm working on (LDB_Algebra). It has an extra that depends on another package that I created (LDB_LAPACK). I have created a virtualenv and installed each of these packages as shown: $ virtualenv -p pypy ve_pypy $ .…
CrazyCasta
  • 26,917
  • 4
  • 45
  • 72
0
votes
1 answer

Tree structure for namespace package

I have an package named networkx-metis which has the following tree structure networkx-metis/ setup.py networkx/ __init__.py addons/ __init__.py …
Himanshu Mishra
  • 8,510
  • 12
  • 37
  • 74
1 2 3
4