This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients Arfrever, benjamin.peterson, ned.deily, ronaldoussoren, trent
Date 2012-09-04.08:11:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1346746316.21.0.851506483947.issue15838@psf.upfronthosting.co.za>
In-reply-to
Content
FWIW the patch is issue15645 was a patch that fixed the issue with minimal changes, as it was created close to the first 3.3 release candidate I didn't want to change code when that could be avoided.

A fix that writes the generated file into the build tree instead of the source tree requires changes to lib2to3.pgen.driver:load_grammar: it assumes it can derive the path of the pickle file from the path of the grammar file, which wouldn't be true when storing the pickle file in the build directory and the build directory is not the same as the source directory.

Now that I look at this code again: the patch is issue15645 was probably make necessary by the introduction of $(PYTHON_FOR_BUILD), that expands to './$(BUILD_PYTHON) -E' on my machine, and that means the PYTHONPATH setting is ignored which is why the file is created in the source directory instead of the installation directory.

This means it could be fairly easy to properly fix this issue:

- Move the line back to the end of the libinstall recipe
- Add "import sys, os; sys.path.insert(0, os.environ['PYTHONPATH']"
  to the start of the python scriptlet (before "import lib2to3....")

I haven't tested yet if that actually works though.
History
Date User Action Args
2012-09-04 08:11:56ronaldoussorensetrecipients: + ronaldoussoren, benjamin.peterson, ned.deily, trent, Arfrever
2012-09-04 08:11:56ronaldoussorensetmessageid: <1346746316.21.0.851506483947.issue15838@psf.upfronthosting.co.za>
2012-09-04 08:11:54ronaldoussorenlinkissue15838 messages
2012-09-04 08:11:54ronaldoussorencreate