Skip to content
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

fix(pypi): allow pip_compile to work with read-only sources #2712

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rbeasley-avgo
Copy link

The validating py_test generated by compile_pip_requirements chokes when the source requirements.txt is stored read-only, such as when managed by the Perforce Helix Core SCM. Though dependency_resolver makes a temporary copy of this file, it does so w/ shutil.copy which preserves the original read-only file mode. To address this, this commit replaces shutil.copy with a shutil.copyfileobj such that the temporary file is created w/ permissions according to the user's umask.

Resolves (#2608).

@rbeasley-avgo rbeasley-avgo marked this pull request as ready for review March 31, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant