brp-python-bytecompile
David Malcolm
dmalcolm at redhat.com
Fri Nov 20 18:41:25 UTC 2009
On Fri, 2009-11-20 at 09:53 -0700, Jerry James wrote:
> I'm looking into the build failures Matt identified. With my shiny
> new Rawhide VM, I'm seeing this output on a local build of a package
> with no python sources:
>
> [ ... successful build messages ...]
> + /usr/lib/rpm/brp-python-bytecompile
> Bytecompiling .py files below [BUILDROOT]/usr/lib*/python*/ using
> /usr/bin/python*
> Usage: /usr/bin/python-config
> [--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--help]
> Usage: /usr/bin/python-config
> [--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--help]
> + /usr/lib/rpm/redhat/brp-python-hardlink
> [ ... successful build messages ...]
>
> The rpm build is completing, so I'm not worried about this particular
> package. Is this going to cause problems with packages that do have
> python sources, or is this just because nothing matches
> /usr/lib*/python*/ in the build root? It looks like python_binary =
> /usr/bin/python*, which can match any of these:
>
> /usr/bin/python
> /usr/bin/python-config
> /usr/bin/python2
> /usr/bin/python2.6
> /usr/bin/python2.6-config
>
Sorry; looks like my fault.
I updated /usr/lib/rpm/brp-python-bytecompile to better cope with the
python 2 vs python 3 split; this was in:
https://bugzilla.redhat.com/show_bug.cgi?id=531117
>From my reading, what's happening is that I coded it with the
(incorrect) assumption that files exist which match
$RPM_BUILD_ROOT/usr/lib*/python*/
When at least one such file exists, I believe the shell expands the glob
and thus we iterate over the library subdirectories, byte-compiling
all .py files in them with the appropriate version of python.
When no such directory exists, the shell fails to expand it, and retains
it as the text string:
your_build_root/usr/lib*/python*/
and thus one iteration of that loop happens, and we get the two error
messages.
So I believe this is harmless but messy.
Filed as https://bugzilla.redhat.com/show_bug.cgi?id=539635
Sorry for any confusion.
Dave
More information about the fedora-devel-list
mailing list