-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry fails to install p4python due to read-only files #520
Comments
I face the same issue.
Adding p4python via pipenv works as well. I'm not sure why adding it via poetry retrieves p4python-2017.2.1615960.tar.gz and then throws the permissioning error: [https://gist.github.com/nagulv/9be7c38d8796b1b1609d45041eaf5f30](p4python backtrace Gist) |
I decided to dig a little more into why this happens. So it looks like poetry went to pypi to get the
So poetry looks at all of the wheels. It will only look at the wheels if
Because p4python is not universal and has an sdist, the sdist is favored. So poetry downloads and tries to use the sdist. The problem is the sdist is probably built from source within perforce where all of the files are marked read-only unless someone is editing them. This then causes problems with the use of |
A quick workaround would be to have |
Except we're using https://github.com/python/cpython/blob/master/Lib/tempfile.py#L794 |
For a package without dependencies in pypi's database, like p4python, the sdist is required. The problem is p4python was developed in perforce where all files are read-only by default and deleting the temp directory fails. So we need to use the custom-built temp directory and specially handle read-only files to be able to use p4python in poetry. Fixes python-poetry#520
For a package without dependencies in pypi's database, like p4python, the sdist is required. The problem is p4python was developed in perforce where all files are read-only by default and deleting the temp directory fails. So we need to use the custom-built temp directory and specially handle read-only files to be able to use p4python in poetry. Fixes python-poetry#520
For a package without dependencies in pypi's database, like p4python, the sdist is required. The problem is p4python was developed in perforce where all files are read-only by default and deleting the temp directory fails. So we need to use the custom-built temp directory and specially handle read-only files to be able to use p4python in poetry. Fixes python-poetry#520
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
As a user, this is a bit frustrating for issues to be automatically closed when the problem is unresponsiveness from the maintainers. |
@epage Nice fix, I would like this fix as well. Looks like feedback from the PR wants this change to be against master and not develop. |
For a package without dependencies in pypi's database, like p4python, the sdist is required. The problem is p4python was developed in perforce where all files are read-only by default and deleting the temp directory fails. So we need to use the custom-built temp directory and specially handle read-only files to be able to use p4python in poetry. Fixes python-poetry#520
For a package without dependencies in pypi's database, like p4python, the sdist is required. The problem is p4python was developed in perforce where all files are read-only by default and deleting the temp directory fails. So we need to use the custom-built temp directory and specially handle read-only files to be able to use p4python in poetry. Fixes python-poetry#520
Upvote, please merge in this fix. |
For a package without dependencies in pypi's database, like p4python, the sdist is required. The problem is p4python was developed in perforce where all files are read-only by default and deleting the temp directory fails. So we need to use the custom-built temp directory and specially handle read-only files to be able to use p4python in poetry. Fixes python-poetry#520
This issue was re-introduced with the split to |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
In digging into the problem, it seems that p4python's files are all marked read-only, causing windows to error when trying to delete them via
shutil.rmtree
which is invoked by poetry's custom temp directory handling.The text was updated successfully, but these errors were encountered: