New submission from Ned Deily:

With the recent activity around making out-of-tree builds work, while 
investigating Issue15822 I realized that the lib2to3 grammar pickle files are 
being built in the source directory by the libinstall target step of the main 
Makefile rather than in the build directory or just in the install location.  
The fixes for Issue15645 moved the pickle building to the start of the target 
recipes:

libinstall:     build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
                $(PYTHON_FOR_BUILD) -Wi -c "import lib2to3.pygram, 
lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"


On reflection, I think the PYTHONPATH definition is bogus here since LIBDEST is 
populated immediately after this step. More importantly, 
lib2to3/pgen2/driver:load_grammar ends up writing the pickle files into the 
source directory.  Unlike some other cases in the Makefile, if the source 
directory is read-only, the failure to create the pickle files is not an error 
during installation but it may likely cause problems for later users of the 
installed lib2to3 (like in the Issue15822 scenario), i.e. when the missing 
pickles are attempted to be created in the read-only install directories.

----------
components: 2to3 (2.x to 3.x conversion tool), Build, Installation
messages: 169623
nosy: benjamin.peterson, ned.deily, ronaldoussoren, trent
priority: normal
severity: normal
stage: needs patch
status: open
title: make install tries to create lib2to3 grammar pickles in source directory
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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

Reply via email to