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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



chriscool@xxxxxxxxxxxxx wrote on Tue, 18 Dec 2012 20:00 +0100:
> 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@xxxxxxxxxxxxx>

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@xxxxxxxx>

Thanks for fixing this bug.

		-- Pete
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]