pvjohnson / gyp

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

gyp_main.py relies on the gyp version installed on the host #491

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install Debian GNU/Linux testing, install gyp by means of apt
2. clone this repository
3. invoke gyp_main.py

What is the expected output? What do you see instead?

I'd expect all the options to be available (as an example --root-target), 
instead gyp_main.py invokes the gyp present in the system which does not offer 
those options.
Usually, I clone the repo because I'm interested in the most updated code.
Instead the gyp_main.py file do not patch the sys.path and relies on something 
different.

What version of the product are you using? On what operating system?

I've cloned the gyp repo, branch master. OS is Debian GNU/Linux (testing)

Please provide any additional information below.

The problem can be solved patching the file gyp_main.py as follows:

[...]
try:
  import os.path
  sys.path = [os.path.join(os.path.dirname(sys.argv[0]), 'pylib')] + sys.path
  import gyp
[...]

Original issue reported on code.google.com by michele....@cynny.com on 18 May 2015 at 11:20

GoogleCodeExporter commented 9 years ago
nevermind, using PYTHONPATH the problem is solved. no need to patch gyp_main.py.
anyway, I'm still trying to figure out why a freshly cloned repo should rely on 
the gyp version installed in the system.

Original comment by michele....@cynny.com on 18 May 2015 at 12:30