Martin v. Löwis added the comment:

I think the patch for issue 15645 was incorrect. Instead of generating the 
pickles in the source tree and copying them, it should have arranged lib2to3 to 
generate them in the target directory instead (just as all the compileall 
invocations also generate files in LIBDEST).

There are multiple ways to achieve this. The least intrusive (perhaps) is to 
insert "$(DESTDIR)$(LIBDEST)" into sys.path before importing lib2to3 in the 
Makefile.

The approach that I suggest is to make lib2to3.pgen2.driver a script which 
expects a .txt path, and generates a pickle next to it, so the installation 
would do

$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver 
$(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver 
$(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt

----------
nosy: +loewis

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

Reply via email to