Hi Paul,

On 4/22/24 12:56 AM, Paul Eggert wrote:>   export GNULIB_TOOL_IMPL=sh+py
>   ./bootstrap
>   ./configure
>   make -k distclean
>   git submodule foreach git pull origin master
>   git commit -m 'build: update gnulib submodule to latest' gnulib
>   ./bootstrap --no-git --gnulib-srcdir=gnulib
> 
> The problem is that the Python-based build leaves behind a __pycache__ 
> directory, which causes the comparison to fail.

I always noticed that directory in gnulib/pygnulib. I assumed
it was my LSP or something causing it...

Now looking into this, I think Python creates it upon executing a
script and/or doing 'import module-name'.

It looks like it can be turned off with 'python3 -B' or setting the
PYTHONDONTWRITEBYTECODE environment variable to a non-empty string [1]
[2].

Since I always used a separate gnulib clone that wasn't in a
subdirectory (data caps unfortunately), I never ran into this issue.

Time for me to test my hypothesis and hope I didn't speak too soon. :)

[1] https://docs.python.org/3/using/cmdline.html#cmdoption-B
[2] https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDONTWRITEBYTECODE

Collin

Reply via email to