[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

Ronald Oussoren report at bugs.python.org
Mon Aug 20 09:07:18 CEST 2012


Ronald Oussoren added the comment:

I'm pretty sure this is a generic Makefile bug.  I could reproduce this problem with a clean install into a new prefix, after cleaning up the source tree: 'make clean' won't remove the generated file when srcdir != builddir.

This line in the Makefile seems to generate the pickle file:

        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
                $(PYTHON_FOR_BUILD) -Wi -c "import lib2to3.pygram,lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"

This uses $(PYTHON_FOR_BUILD) to generate the cache file, and that which means the cache file is generated in the *source* tree, not in the installation tree.  This command is at the end of the libinstall target, which means the generatd file is not copied into the installation prefix.

Running 'make install' twice will therefore install the file.

The attached patch seems to fix the issue by moving the command to the start of the libinstall target. The patch also fixes "make clean", by explicitly targetting the pickle files in $(srcdir)/Lib/lib2to3.


BTW. What "known OSX problems"?

BTW2. This should affect all platforms that use Makefiles (basicly anything but Windows)

----------
components: +Build
keywords: +needs review, patch
stage:  -> patch review
type:  -> compile error
Added file: http://bugs.python.org/file26916/issue15645.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15645>
_______________________________________


More information about the Python-bugs-list mailing list