Re: [PATCH v2] git-instaweb: Add Python builtin http.server support

2019-01-28 Thread Junio C Hamano
Arti Zirk writes: > The generated wrapper is compatible with both Python 2 and 3. ;-) Yup, that obviously is the best way to settle "should we make it clear that this would not work with Python 2?" question.

Re: [PATCH v2] git-instaweb: Add Python builtin http.server support

2019-01-28 Thread Arti Zirk
> I will point out, that despite what the PEPs say, on Debian and > derivatives, "python" will always invoke Python 2, and never Python > 3. > > This is probably fine for now, but we'll need to reconsider it before > 2020. In this case it shouldn't be a problem because I have made sure that it wo

Re: [PATCH v2] git-instaweb: Add Python builtin http.server support

2019-01-28 Thread brian m. carlson
On Mon, Jan 28, 2019 at 03:24:59PM +0200, Arti Zirk wrote: > + # generate a standalone 'python http.server' script in $fqgitdir/gitweb > + # This asumes that python is in user's $PATH > + # This script is Python 2 and 3 compatible > + cat > "$fqgitdir/gitweb/gitweb.py" < +#!/usr/bin

[PATCH v2] git-instaweb: Add Python builtin http.server support

2019-01-28 Thread Arti Zirk
With this patch it is possible to launch git-instaweb by using Python http.server CGI handler via `-d python` option. git-instaweb generates a small wrapper around the http.server (in GIT_DIR/gitweb/) that address a limitation of the CGI handler where CGI scripts have to be in a cgi-bin subdirecto