Skip to content

Rely on importlib2 and PEP 420 for namespace packages #406

@ghost

Description

Originally reported by: jaraco (Bitbucket: jaraco, GitHub: jaraco)


In this comment, @ncoghlan indicates that it may be possible to get PEP-420 namespace packages on Python 2.7. @rbtcollins indicates that he's worked on this as well with some issues.

I'd like to see setuptools support (and prefer) the PEP 420 model for namespaces. I don't yet have an idea quite what the solution looks like, so I'm opening this discussion here.

Is it possible for setuptools to detect whether the importlib2 hook has been installed on older Pythons? Would that be a sufficient condition in practice to infer that packages could be installed with that model (and eliminate the .pth and other init.py techniques)?

As a solution for this issue would likely address issues with namespace packages between different installation models, I'm marking it as higher priority.


Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions