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

Re: [PATCH 1/2] remote-helpers: tests: use python directly

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 18, 2013, 03:04 UTC
Message-ID
<CAMP44s1w98hDbJx10PFDnS3YeYhFAHDyw=O2LdwCendLG6DVQQ@mail.gmail.com>
In-Reply-To
<CAJDDKr6Qnx5ddBn=6reNOY44CxaDgD254H7M3K2mb8bbd8jpmA@mail.gmail.com>
On Fri, May 17, 2013 at 9:51 PM, David Aguilar <davvid@gmail.com> wrote:
Show 27 quoted lines
> On Fri, May 17, 2013 at 7:12 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>>> These remote helpers use 'env python', not PYTHON_PATH, so that's where
>>> we should check for the extensions. Otherwise, if 'python' is not
>>> PYTHON_PATH (e.g. /usr/bin/python: Makefile's default), there will be a
>>> mismatch between the python libraries actually accessible to the remote
>>> helpers.
>>
>> What I am reading here is that what the "helper" uses and what the
>> "test" checks to see if it can use the "helper" were different; and
>> this patch fixes that misalignment by testing what the "helper"
>> actually uses.
>>
>> So it is a right thing to do in that sense.
>>
>> I however am having this nagging feeling that I may be missing
>> something subtle here.  Comments from others are very much welcome.
>
> Yes, this is correct.  Another way to skin this cat would be to do
> search/replace in a Makefile to burn in the PYTHON_PATH similar to how
> we do for the .sh scripts and other .py files in the main Makefile.
> The remote helpers are in contrib/ so they do not go through the main
> Makefile, which is the root cause.
>
> Longer-term, it would be good to treat these uniformly, but this is no
> worse for now.

Yeap, I initially thought it would be tricky to implement in the rather minimal Makefile, but it seems it wouldn't. Whoever, I still find it useful that I don't have to run 'make' to test these, and I think it's nice that people can download directly as the final name ('git-remote-hg'), and don't have to rename. And since these aren't installed with 'make install' anyway, I don't see any big hurry.

Cheers.
-- 
Felipe Contreras
Previous: David AguilarNext: Junio C Hamano
Message 5 of 12 in “remote-helpers: test fixes”
  1. 0/2 remote-helpers: test fixesFelipe Contreras, May 17, 2013
  2. 1/2 remote-helpers: tests: use python directlyFelipe Contreras, May 17, 2013
  3. Junio C HamanoMay 18, 2013
  4. David AguilarMay 18, 2013
  5. Felipe ContrerasMay 18, 2013
  6. Junio C HamanoMay 19, 2013
  7. Felipe ContrerasMay 19, 2013
  8. 2/2 remote-hg: tests: fix hg mergeFelipe Contreras, May 17, 2013
  9. Junio C HamanoMay 20, 2013
  10. Felipe ContrerasMay 20, 2013
  11. Junio C HamanoMay 20, 2013
  12. Felipe ContrerasMay 20, 2013

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.