git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 2/3] Makefile: detect when PYTHON_PATH changes

From
PWPete Wyckoff <pw@padd.com>
Date
Dec 18, 2012, 23:42 UTC
Message-ID
<20121218234202.GA13151@padd.com>
In-Reply-To
<20121218190009.29910.39426.chriscool@tuxfamily.org>
chriscool@tuxfamily.org wrote on Tue, 18 Dec 2012 20:00 +0100:
Show 15 quoted lines
> When make is run, the python scripts are created from *.py files that
> are changed to use the python given by PYTHON_PATH. And PYTHON_PATH
> is set by default to /usr/bin/python on Linux.
> 
> This is nice except when you run make another time setting a
> different PYTHON_PATH, because, as the python scripts have already
> been created, make finds nothing to do.
> 
> The goal of this patch is to detect when the PYTHON_PATH changes and
> to create the python scripts again when this happens. To do that we
> use the same trick that is done to track other variables like prefix,
> flags, tcl/tk path and shell path. We update a GIT-PYTHON-VARS file
> with the PYTHON_PATH and check if it changed.
> 
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

I played around with this a bit in the context of git-p4; and it seems to work fine.

It's interesting that the code in git_remote_helpers/Makefile does not work with python3, but that's not a problem to solve here. If you get interested in looking, that approach to installing always struck me as a bit odd. If it is the right way, though, maybe we should try to unify the approach to git-p4 and potential future .py scripts in git.

Acked-by: Pete Wyckoff <pw@padd.com>
Thanks for fixing this bug.
		-- Pete
Previous: Christian CouderNext: Junio C Hamano
Message 2 of 3 in “Makefile: detect when PYTHON_PATH changes”
  1. 2/3 Makefile: detect when PYTHON_PATH changesChristian Couder, Dec 18, 2012
  2. Pete WyckoffDec 18, 2012
  3. Junio C HamanoDec 19, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.