ironm73 / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

check that V8_HOME is set in setup.py #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On platforms where it's common to build/install with sudo, it's not obvious 
V8_HOME needs to be set for the root user. If you don't know this, you run 
setup.py and it dies with:

Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    os.path.join(os.environ.get('V8_HOME'), 'include'),
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pytho
n2.6/posixpath.py", line 67, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

This is not terribly obvious that the problem is that V8_HOME is not being 
set because you're running as root. I propose that you do an explicit check 
for V8_HOME at the beginning of setup.py and make sure it's there. If not, 
tell the user it's not set in the environment setup.py is being run in 
(perhaps even mention it must be set for root if using sudo).

Original issue reported on code.google.com by progr...@gmail.com on 10 Jan 2010 at 7:06

GoogleCodeExporter commented 9 years ago
Ok, I have added some code to check that the environment variable V8_HOME 
exists and 
points to a valid v8 source folder first.

Please check out the source code from SVN after r198 and verify it.

Thanks

Original comment by flier...@gmail.com on 11 Jan 2010 at 2:04

GoogleCodeExporter commented 9 years ago
Verified.

Original comment by progr...@gmail.com on 12 Jan 2010 at 8:49

GoogleCodeExporter commented 9 years ago
Thanks :)

Original comment by flier...@gmail.com on 13 Jan 2010 at 2:21