Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make install should generate grammar file #59964

Closed
regebro mannequin opened this issue Aug 22, 2012 · 3 comments
Closed

make install should generate grammar file #59964

regebro mannequin opened this issue Aug 22, 2012 · 3 comments
Labels
topic-installation type-bug An unexpected behavior, bug, or error

Comments

@regebro
Copy link
Mannequin

regebro mannequin commented Aug 22, 2012

BPO 15760
Nosy @regebro, @hynek

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2012-08-22.08:27:29.222>
created_at = <Date 2012-08-22.08:15:56.142>
labels = ['type-bug', 'expert-installation']
title = 'make install should generate grammar file'
updated_at = <Date 2012-08-22.08:27:29.221>
user = 'https://github.com/regebro'

bugs.python.org fields:

activity = <Date 2012-08-22.08:27:29.221>
actor = 'lregebro'
assignee = 'none'
closed = True
closed_date = <Date 2012-08-22.08:27:29.222>
closer = 'lregebro'
components = ['Installation']
creation = <Date 2012-08-22.08:15:56.142>
creator = 'lregebro'
dependencies = []
files = []
hgrepos = []
issue_num = 15760
keywords = []
message_count = 3.0
messages = ['168854', '168855', '168857']
nosy_count = 2.0
nosy_names = ['lregebro', 'hynek']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue15760'
versions = ['Python 3.3']

@regebro
Copy link
Mannequin Author

regebro mannequin commented Aug 22, 2012

If you install Python 3.3b2 with "sudo make install", a standard way of installing it so that users don't have rights to install global modules, then everytime lib2to3.pgen2.driver.load_grammar() is called, it aims to generate a a grammar table and write it as a pickle to a cache file.

However, unless you are superuser when doing this, writing the file will of course fail, with a message similar to this:

INFO:root:Generating grammar tables from /opt/python33/lib/python3.3/lib2to3/PatternGrammar.txt
INFO:root:Writing grammar tables to /opt/python33/lib/python3.3/lib2to3/PatternGrammar3.3.0.beta.2.pickle
INFO:root:Writing failed:[Errno 13] Permission denied: '/opt/python33/lib/python3.3/lib2to3/PatternGrammar3.3.0.beta.2.pickle'

A workaround is to run the script that creates the above errors as superuser once, and the message goes away.

I think the correct thing to do here is for make install to Generate these grammar tables and write the pickle.

Steps to reproduce:

  1. Install Python 3.3.b2 with "./configure;make;sudo make install"
  2. Check out the Distribute sources: "hg clone https://bitbucket.org/stefanholek/distribute"
  3. Run the Distribute tests: "python3.3 setup.py test"

@regebro regebro mannequin added type-bug An unexpected behavior, bug, or error topic-installation labels Aug 22, 2012
@hynek
Copy link
Member

hynek commented Aug 22, 2012

Seems related to bpo-15645, no?

@regebro
Copy link
Mannequin Author

regebro mannequin commented Aug 22, 2012

Yes, and for some reason it didn't show up when I searched for "Grammar" 10 minutes ago, but now it does. :-) It's a duplicate, indeed.

@regebro regebro mannequin closed this as completed Aug 22, 2012
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-installation type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant