[BUG] egg_info run stage writes files to local directory as of verison 60.0.0
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
setuptools version
setuptools>=60.0.0
Python version
3.8.12
OS
Linux (unknown dist)
Additional environment information
Conda: 4.9.2
pip list output:
Package Version
---------- -------
pip 22.0.4
setuptools 60.0.0
wheel 0.37.1
Description
I am trying to run:
python setup.py build --build-base=$HOME/tmp install --prefix=$CONDA_PREFIX
to install a package from a directory to which I do not have any write permissions (it is not an option to change the permissions). As of version 60.0.0 the installation fails with the message that it cannot write dist/pkgname.egg_info.
Expected behavior
A successful installation
How to Reproduce
- Create a custom package with an setup.py (unfortunately I cannot share the package to you)
- Remove writing permissions from the package
- Run
python setup.py build --build-base=$HOME/tmp install --prefix=$PREFIXwhere you replace$PREFIXwith a directory of your python installation - Observe the
Permission Deniederror
The bug is reproduced in version 60.0.0, 60.9.3. the last version in which the bug does not occur is 59.8.0.
Output
running egg_info
creating dist/pkgname.egg-info
error: could not create 'dist/pkgname.egg-info': Permission denied
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported setup.py build and install command with a non-writable package directory, comparing setuptools 59.8.0 with 60.0.0 or later. Trace the egg_info run stage and how it chooses the dist/pkgname.egg-info location; done means the installation succeeds without requiring writes to the source directory.
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
- 48/100