Skip to content

locations.locations.distutils_scheme() reports incorrect header paths for editable installs #3696

@nils-werner

Description

@nils-werner
  • Pip version: 8.1.2
  • Python version: 2.7.11
  • Operating System: OSX 10.11

Description:

You can get the location of header files of an installed package -- e.g. pybind11 -- using

>>> pip.locations.distutils_scheme('pybind11')['headers']
'/virtualenv/include/site/python2.7/pybind11'

However the returned path is only correct if it was installed regularily. When doing an editable install the headers are not copied to that directory and the path is incorrect for editable installs.

What I've run:

$ pip install pybind11
$ python -c "from pip import locations as l; print l.distutils_scheme('pybind11')['headers']"
/virtualenv/include/site/python2.7/pybind11

$ pip uninstall pybind11
$ pip install -e ./pybind11
$ python -c "from pip import locations as l; print l.distutils_scheme('pybind11')['headers']"
/virtualenv/include/site/python2.7/pybind11

The path for both is the same, but for an editable installs no headers are ever copied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions