[BUG] Access denied on Windows when attempting to delete a temporary file created by the install process
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==65.4.1
Python version
Python 3.9.7
OS
Windows 10
Additional environment information
This only happens on Windows, only when installing with pip -e, and I've so far only ever seen it with Cython.
Description
When installing a Cython project with pip -e on Windows, it seems to create a read-only file and then attempt to delete it, always resulting in an access denied error even when run from an administrator shell.
This is effectively a duplicate of the Cython issue https://github.com/cython/cython/issues/4489 (see more detail there). Cython claims that it's a distutils/setuptools error, however, and the most recent time I got this issue the log explicitly directed me to raise an issue here (see log below).
Expected behavior
At least when run as administrator, I shouldn't be seeing access denied errors, especially due to files created by the build process itself.
How to Reproduce
The project I've been experiencing this error with is cPyparsing. It should be reproducible if you clone the repository and pip install -e . on Windows.
Output
log: https://gist.github.com/evhub/fbf4657752e4595b83b582e626fa0fb9
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 editable install with cPyparsing using pip install -e . on Windows 10, then review the linked output and the Cython issue for the failing cleanup operation. Trace which setuptools editable-install or build-process entry point creates and deletes the temporary file. Done means the reproduction no longer reports access denied for a file created by the build process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100