Last Comment Bug 758739 - Use of virtualenv broke using system ply library
: Use of virtualenv broke using system ply library
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla15
Assigned To: Mike Hommey [:glandium]
:
:
Mentors:
Depends on:
Blocks: 661908 907902
  Show dependency treegraph
 
Reported: 2012-05-25 12:25 PDT by Mike Hommey [:glandium]
Modified: 2013-08-21 13:48 PDT (History)
2 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Allow virtualenv to use system-wide site-packages (1.00 KB, patch)
2012-05-25 12:28 PDT, Mike Hommey [:glandium]
ted: review+
Details | Diff | Splinter Review

Description Mike Hommey [:glandium] 2012-05-25 12:25:20 PDT
/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
Comment 1 Mike Hommey [:glandium] 2012-05-25 12:28:25 PDT
Created attachment 627320 [details] [diff] [review]
Allow virtualenv to use system-wide site-packages
Comment 2 Mike Hommey [:glandium] 2012-05-25 14:13:11 PDT
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.
Comment 3 Mike Hommey [:glandium] 2012-05-25 15:11:07 PDT
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.
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-05-26 05:35:34 PDT
https://hg.mozilla.org/mozilla-central/rev/ca63d04985f9

Note You need to log in before you can comment on or make changes to this bug.