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
extend compileall to compile single files #52387
Comments
when byte-compiling files in a deb/rpm package distributed e.g. in a Linux distribution, it is sometimes wanted to only touch the files found in the deb/rpm, which can be a subset of the files in a directory. the attached patch now lets compileall accept files as arguments as well and adds the recognition of @<filelist> and @- to expand the arguments with the contents of the file (@- meaning to read for stdin). Is this ok for 2.7, and a port of that to 3.2? |
+1 on this functionality being added for 2.7 and 3.2. You also mentioned in pvt email that it would be better to patch compileall.py than py_compile.py to take advantage of the quiet and force options (which seems good to me). I have a few comments on the diff:
Bonus points for updating this to modern Python <wink>. E.g. using True/False instead of 1/0, and 'OSError as error' instead of 'os.error, e'. But don't worry about that too much; I'll probably take that on as part of my PEP-3147 work. ;) |
changed the @ syntax to an option -i, and added a test for compile_file/compile_dir. |
Looks good to me, and should help distros, so +1. |
fixed for 2.7 and 3.2 |
I have added versionadded directives that were missing in the doc. |
I also added the missing function description. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: