Skip to content

Setuptools needs to be vendored #9034

@adamjstewart

Description

@adamjstewart

Both jinja2 and pytest have a setuptools dependency, but we aren't currently vendoring setuptools:

$ grep -R pkg_resources
jinja2/loaders.py:        from pkg_resources import DefaultProvider, ResourceManager, \
_pytest/vendored_packages/pluggy.py:        from pkg_resources import (iter_entry_points, DistributionNotFound,
_pytest/config.py:        import pkg_resources
_pytest/config.py:            for entrypoint in pkg_resources.iter_entry_points('pytest11')
_pytest/assertion/rewrite.py:        self._register_with_pkg_resources()
_pytest/assertion/rewrite.py:    def _register_with_pkg_resources(cls):
_pytest/assertion/rewrite.py:            import pkg_resources
_pytest/assertion/rewrite.py:            pkg_resources.__name__
_pytest/assertion/rewrite.py:        pkg_resources.register_loader_type(cls, pkg_resources.DefaultProvider)
_pytest/outcomes.py:            from pkg_resources import parse_version as pv
_pytest/outcomes.py:                          "pkg_resources to parse version strings." % (modname,),

Currently, when I build python with Spack and use it to try to run the unit tests, I see the following error message:

==> Error: No module named 'pkg_resources'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions