The default bug view has changed. See this FAQ.

Use of virtualenv broke using system ply library

RESOLVED FIXED in mozilla15

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla15
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
/tmp/buildd/iceweasel-15.0~a1+20120525070245/build-xulrunner/_virtualenv/bin/python ../../../config/pythonpath.py \
	   \
	  ../../../xpcom/idl-parser/header.py --cachedir=. --regen
Traceback (most recent call last):
  File "../../../config/pythonpath.py", line 56, in <module>
    main(sys.argv[1:])
  File "../../../config/pythonpath.py", line 48, in main
    execfile(script, frozenglobals)
  File "../../../xpcom/idl-parser/header.py", line 10, in <module>
    import sys, os.path, re, xpidl, itertools, glob
  File "/tmp/buildd/iceweasel-15.0~a1+20120525070245/xpcom/idl-parser/xpidl.py", line 11, in <module>
    from ply import lex, yacc
ImportError: No module named ply
(Assignee)

Comment 1

5 years ago
Created attachment 627320 [details] [diff] [review]
Allow virtualenv to use system-wide site-packages
Attachment #627320 - Flags: review?(ted.mielczarek)
Attachment #627320 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 2

5 years ago
This might be breaking building with ply from other-licenses :( :
Traceback (most recent call last):
  File "../../../../../config/pythonpath.py", line 56, in <module>
    main(sys.argv[1:])
  File "../../../../../config/pythonpath.py", line 48, in main
    execfile(script, frozenglobals)
  File "/tmp/buildd/iceweasel-15.0~a1+20120525070245/build-xulrunner/dist/sdk/bin/header.py", line 480, in <module>
    p = xpidl.IDLParser(outputdir=options.cachedir)
  File "/tmp/buildd/iceweasel-15.0~a1+20120525070245/build-xulrunner/dist/sdk/bin/xpidl.py", line 1541, in __init__
    optimize=1)
  File "/tmp/buildd/iceweasel-15.0~a1+20120525070245/other-licenses/ply/ply/lex.py", line 1004, in lex
    lexobj.writetab(lextab,outputdir)
  File "/tmp/buildd/iceweasel-15.0~a1+20120525070245/other-licenses/ply/ply/lex.py", line 175, in writetab
    filename = os.path.join(outputdir,basetabfilename)+".py"
  File "/tmp/buildd/iceweasel-15.0~a1+20120525070245/build-browser/_virtualenv/lib/python2.7/posixpath.py", line 68, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

If I remove the -I../../../../../other-licenses/ply from the command line, it works.
(Assignee)

Comment 3

5 years ago
Apparently, my problem in comment 2 is due to my setup, where i build xulrunner with system ply and iceweasel against the xulrunner sdk, but without system ply, so when using with -I../../../../../other-licenses/ply, ply must be deciding it must regenerate the cache because it's not the same as the one used to build the cache, and since no cache directory is set, it fails. Under normal conditions, it doesn't fail.
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ca63d04985f9
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/ca63d04985f9
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED

Updated

4 years ago
Blocks: 907902
You need to log in before you can comment on or make changes to this bug.