Skip to content

pip wheel fails without useful error message when --wheel-dir not writable #5740

@timb07

Description

@timb07

Environment

  • pip version: 18.0
  • Python version: 3.7
  • OS: macOS 10.13.6

Description

When wheel is invoked specifying a non-writable destination directory with --wheel-dir, it fails but doesn't give an error indicating the cause of the failure.

$ pip3 wheel --wheel-dir=not_writable_directory .
Processing /home/user/example_pkg
Building wheels for collected packages: example-pkg
  Running setup.py bdist_wheel for example-pkg ... done
  Running setup.py clean for example-pkg
Failed to build example-pkg
ERROR: Failed to build one or more wheels

Adding -vvv to the pip3 command line provides more output but still no useful error message.

Expected behavior

I would expect to see something like:

Failed to write not_writable_directory/example_pkg-0.0.1-py3-none-any.whl: permission denied

How to Reproduce

  1. Get any wheel-installable package source (e.g. pip or the minimal example at https://packaging.python.org/tutorials/packaging-projects/)
  2. Make a directory that isn't writable: mkdir not_writable_directory; chmod 555 not_writable_directory
  3. Then run pip3 wheel --wheel-dir=not_writable_directory .
  4. The wheel doesn't build, but no useful error message is given.

Output

See above.

Note

This was originally raised as a bug in wheel: pypa/wheel#246

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: wheelThe wheel format and 'pip wheel' commandauto-lockedOutdated issues that have been locked by automationtype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions