New submission from John Beck:

Background: on Solaris, we build Python and various modules 64-bit. To
make this work with our general 64-bit changes, we use foo/64 as the path
for our shared objects (.so files) rather than foo, for various values
of foo (e.g., "/usr/lib", "/usr/lib/python3.4", etc.).  We had to tweak
Lib/importlib/_bootstrap.py to implement this.  In so doing, we learned
that Python/frozen.o does not pick up this change.  The reason is that
Python/frozen.c has a #include of "importlib.h".  But because of the
quotes, it looks in the same directory for importlib.h .  But when we
rebuild importlib.h (via _freeze_importlib), the rebuilt importlib.h is
placed into our build dir, not $srcdir.  But '#include "importlib.h"'
looks first for $srcdir/Python/importlib.h, finds the old one, then
uses it without finding the rebuilt one over in the build dir.

Although the description of the problem is rather convoluted, the fix is
fortunately extremely simple: change "importlib.h" to <importlib.h>, i.e.,
change the quotes to angle-brackets, per the attached patch.

----------
components: Interpreter Core
files: frozen-path.patch
keywords: patch
messages: 224885
nosy: jbeck
priority: normal
severity: normal
status: open
title: frozen.c should #include <importlib.h> instead of "importlib.h"
versions: Python 3.4
Added file: http://bugs.python.org/file36276/frozen-path.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22148>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to