-
Notifications
You must be signed in to change notification settings - Fork 542
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
Hermetic chmod
/touch
/id
in python_repository
#2016
Comments
I am not sure we can do it:
What is the problem here that you are trying to solve? I'm thinking that we are missing context here (see xy problem) |
For the
Agreed. That would be a good solution.
Apologies, I should have been more explicit in the description. In our organisation, we run our Bazel inside a container that has zero core utilites installed to prove that our builds are truely hermetic. We resolve our core utilties through In this case, it is entirely nitpicky: the usage is POSIX compliant. However, it seems that we could get away with doing it with Python, remove the dependency and make the download hermetic with respect to the host system. |
One reservation that I have is that it suffers from the same problem - how do you handle downloading for the platform that is not the host platform. Then you need a reference to the host interpreter. That said, only the host interpreter needs this special treatment, because the other ones just get packaged up without being used in any way. I personally think that this could be an interesting approach to dropping some system deps. PRs welcome. :) |
re: It's fine for the pyc to be generated at repo-rule time, for a few reasons:
We could probably precompile the whole stdlib using |
Agree. Would we be happy with a follow up issue/PR? Does making the current setup hermetic satisfy this issue? |
🚀 feature request
Relevant Rules
python_repository
Description
We currently call out the to system
chmod
,touch
andid
binaries.We could do the equivalent functionality with Python.
Describe the solution you'd like
The Python interpreter is downloaded in
python_repository
. If we provide a script as a private attribute to the repository rule, we can perform the readonly permissions change with the downloaded Python interpreter.Describe alternatives you've considered
None. Python has the functionality to perform the
chmod
/touch
/id
.The text was updated successfully, but these errors were encountered: