Dnia 2014-05-20, o godz. 14:27:04 Mike Gilbert <flop...@gentoo.org> napisał(a):
> On Tue, May 20, 2014 at 2:19 PM, Michał Górny <mgo...@gentoo.org> wrote: > > It serves both as public shebang fixing function and replacement of > > _python_rewrite_shebang internal function. For the sake of having common > > code and consistent behavior. > > > > Notes on the 'new' function: > > > > 1. takes a list of files and/or directories to fix. Directories are > > processed recursively, > > > > 2. files, depending on the shebang: > > > > a) with shebang matching $EPYTHON (e.g. already having pythonX.Y) are > > skipped silently (but see 3), > > > > b) with shebang 'compatible' with $EPYTHON (e.g. python3 -> python3.2, > > but not python2 -> python3.2) are mangled verbosely, > > > > c) with shebang 'incompatible' with $EPYTHON (e.g. python3 -> python2.7, > > python3.2 -> python3.3) raise a fatal error, > > > > This fatal behavior is a little annoying. I seem to recall people > asking if there is a way to just force it, no matter if the shebang is > 'compatible' or not. I literally spent weeks cleaning up this function and you already request new features :P. > Unfortunately, I do not have example handy, but I know I have been > asked the question. Well, I think it was about some random package having files with 'python3' shebang while they worked with python2.7 as well. I guess we may add some -f/--force option at a point. While at it, it would probably be good if we could work on some consistency in argument parsing of various helper functions. -- Best regards, Michał Górny
signature.asc
Description: PGP signature