pypa / pypa/setuptools

[BUG] wheel install_as_egg does not honor file mode

Open
#3,166 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Needs Triage
Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

setuptools version

setuptools.version '60.2.0'

Python version

= 3.8

OS

Manjaro

Additional environment information

No response

Description

Files installed via Wheel.install_as_egg have the same file mode as installed via pip install

Expected behavior

Files installed via Wheel.install_as_egg have the same file mode as installed via pip install. Needed here https://github.com/buildout/buildout/issues/604

How to Reproduce

Install via pip:

virtuelenv env
env/bin/pip install kaleido

Check mode:

❯ stat -c "%a" env/lib/python3.8/site-packages/kaleido/executable/kaleido                                         
755

Install via install_as_egg:

import setuptools.wheel

if __name__ == "__main__":
    whl = setuptools.wheel.Wheel("kaleido-0.2.1-py2.py3-none-manylinux1_x86_64.whl")
    whl.install_as_egg("./foo")

Check mode:

❯ stat -c "%a" foo/kaleido/executable/kaleido                 
644
Output
# ABOVE

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the setuptools.wheel.Wheel.install_as_egg entry point and reproduce the issue with the kaleido wheel and the provided stat commands. Done means files installed through install_as_egg have the same mode as those installed through pip, including the executable shown in the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.