Pull requests

#168 Open
Repository
ecatmur
Branch
default
Repository
birkenfeld
Branch
default

Build grammar pickles in setup.py and ship in the egg.

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update default
hg pull -r default https://bitbucket.org/ecatmur/sphinx
hg merge ff55f1271f28
hg commit -m 'Merged in ecatmur/sphinx (pull request #168)'
Author
  1. Edward Catmur
Reviewers
Description

If the package is installed to a system shared or read-only location, attempting to generate the grammar pickle will result in a permission denied error:

Running Sphinx v1.1.3
INFO:root:Generating grammar tables from [...]/Sphinx-1.1.3-py2.7.egg/sphinx/pycode/Grammar.txt
INFO:root:Writing grammar tables to [...]/Sphinx-1.1.3-py2.7.egg/sphinx/pycode/Grammar2.7.pickle
INFO:root:Writing failed:[Errno 13] Permission denied: '[...]/Sphinx-1.1.3-py2.7.egg/sphinx/pycode/Grammar2.7.pickle'

The fix is to generate the grammar pickle at build time and ship it in the egg.

  • Learn about pull requests

Comments (1)

  1. Takayuki Shimizukawa

    Thanks for the PR.

    It works well for setup.py sdist; pickle file will be generated on client machine at installation time. However it doesn't work with setup.py bdist_wheel; pickle file will be generated on releasing machine at bdist_wheel time .

    Do you have any idea for avoiding the behavior on bdist_wheel?