bug-gnulib
[Top][All Lists]
Advanced

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

Re: GNU gnulib: calling for beta-testers


From: Bruno Haible
Subject: Re: GNU gnulib: calling for beta-testers
Date: Mon, 22 Apr 2024 13:22:21 +0200

Thanks for the report, Paul.
Thanks for the preliminary investigation, Collin.

> >   ./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 reproduce the issue. It's because executing gnulib-tool.py creates
gnulib/pygnulib/__pycache__, while gnulib-tool.sh does not do so.

Two workarounds are possible. I'm committing both, since the first
workaround works only with Python ≥ 3.8.
  * Let Python create its cache not in gnulib/pygnulib/__pycache__,
    but instead in
    /tmp/gnulib-python-cache-$USER/<absolute_file_name>/gnulib/pygnulib/ .
  * Ignore the __pycache__ directory during the comparison.

The first workaround should fix trouble similar to what we regularly
see with 'autom4te.cache': Unnecessary difference while comparing source
trees, unnecessary "git status" noise. Clutter.


2024-04-22  Bruno Haible  <bruno@clisp.org>

        gnulib-tool: Fix trouble caused by Python's bytecode cache.
        Reported by Paul Eggert in
        <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00367.html>.
        * gnulib-tool: In sh+py mode, ignore the __pycache__ directory during
        comparison.

2024-04-22  Bruno Haible  <bruno@clisp.org>

        gnulib-tool.py: Fix trouble caused by Python's bytecode cache.
        Reported by Paul Eggert in
        <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00367.html>.
        * gnulib-tool.py: Set PYTHONPYCACHEPREFIX, so as to avoid creating a
        __pycache__ directory in the developer's gnulib checkout (only effective
        with Python ≥ 3.8).

Attachment: 0001-gnulib-tool.py-Fix-trouble-caused-by-Python-s-byteco.patch
Description: Text Data

Attachment: 0002-gnulib-tool-Fix-trouble-caused-by-Python-s-bytecode-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]