Skip to content

The 'backports.functools_lru_cache' distribution was not found and is required by pylint #5908

@grondo

Description

@grondo

I'm trying to get make check working with spack install --test=all for the flux package in spack and have run into multiple problems with pylint. I do not know much about pylint, but it appears the py-pylint package may have some missing dependency in spack, as it is failing with a missing distribution of backports.functools_lru_cache when run under make check in the flux build.

I can reproduce also by installing py-pylint in a fresh spack repo:

grondo@peep:/tmp/spack$ export PATH=$PATH:$(pwd)/bin
grondo@peep:/tmp/spack$ spack bootstrap
==> Installing environment-modules@3.2.10%gcc@6.2.0~X arch=linux-ubuntu16.10-x86_64 ^tcl@8.6.6%gcc@6.2.0 arch=linux-ubuntu16.10-x86_64 ^zlib@1.2.11%gcc@6.2.0+pic+shared arch=linux-ubuntu16.10-x86_64 to satisfy requirement for environment-modules
[snip]

grondo@peep:/tmp/spack$ . $(spack location --install-dir environment-modules)/Modules/init/bash
grondo@peep:/tmp/spack$ . share/spack/setup-env.sh
grondo@peep:/tmp/spack$ spack install py-pylint
==> Installing bzip2
[snip]


grondo@peep:/tmp/spack$ spack load py-pylint
grondo@peep:/tmp/spack$ pylint
Traceback (most recent call last):
  File "/home/grondo/git/s.git/opt/spack/linux-ubuntu16.10-x86_64/gcc-6.2.0/py-pylint-1.7.2-fnffkswnxk4mzwn5jhkrqj6ldgclonwm/bin/pylint", line 7, in <module>
    from pkg_resources import load_entry_point
  File "/home/grondo/git/s.git/opt/spack/linux-ubuntu16.10-x86_64/gcc-6.2.0/py-setuptools-35.0.2-od3pp6dt6wbeisrdxbfoi3k6ulsov2sq/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3036, in <module>
    @_call_aside
  File "/home/grondo/git/s.git/opt/spack/linux-ubuntu16.10-x86_64/gcc-6.2.0/py-setuptools-35.0.2-od3pp6dt6wbeisrdxbfoi3k6ulsov2sq/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3020, in _call_aside
    f(*args, **kwargs)
  File "/home/grondo/git/s.git/opt/spack/linux-ubuntu16.10-x86_64/gcc-6.2.0/py-setuptools-35.0.2-od3pp6dt6wbeisrdxbfoi3k6ulsov2sq/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3049, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/grondo/git/s.git/opt/spack/linux-ubuntu16.10-x86_64/gcc-6.2.0/py-setuptools-35.0.2-od3pp6dt6wbeisrdxbfoi3k6ulsov2sq/lib/python2.7/site-packages/pkg_resources/__init__.py", line 654, in _build_master
    ws.require(__requires__)
  File "/home/grondo/git/s.git/opt/spack/linux-ubuntu16.10-x86_64/gcc-6.2.0/py-setuptools-35.0.2-od3pp6dt6wbeisrdxbfoi3k6ulsov2sq/lib/python2.7/site-packages/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/grondo/git/s.git/opt/spack/linux-ubuntu16.10-x86_64/gcc-6.2.0/py-setuptools-35.0.2-od3pp6dt6wbeisrdxbfoi3k6ulsov2sq/lib/python2.7/site-packages/pkg_resources/__init__.py", line 854, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'backports.functools_lru_cache' distribution was not found and is required by pylint
grondo@peep:/tmp/spack$ which pylint
/home/grondo/git/s.git/opt/spack/linux-ubuntu16.10-x86_64/gcc-6.2.0/py-pylint-1.7.2-fnffkswnxk4mzwn5jhkrqj6ldgclonwm/bin/pylint

I get this same or similar error during a build of the flux package when I add py-pylint as a build requirement and run with --tests=all to get our make check to run. I'm somewhat new to spack so I apologize if I've made some basic mistake.

BTW, is there a way to set dependencies that are only needed during make check?

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