jsantell / node-cfx

programmatically use cfx with node.js
MIT License
4 stars 1 forks source link

Call to python breaks on systems with python3 as default #7

Closed peacememories closed 9 years ago

peacememories commented 9 years ago

In my fork I replaced the call with a call to python2, but I'm afraid that might break Windows compatibility, so no pull request for that yet.

jsantell commented 9 years ago

Hm not sure cfx even works with python3

peacememories commented 9 years ago

That's exactly the problem. While python is a symlink to python2.7 on Ubuntu (for example), it is a symlink to python3 on Arch Linux. Basically, on linux the python executable could be either of the incompatible versions. For this reason the python2 and python3 shortcuts have been introduced, which allow explicit calls to the right version of python. I changed the executable in the spawn call to python2 to restore compatibility across linux distros, but I have no idea if this will work on Windows. Workaround would be an os conditional or a search for the file in the path.

PixnBits commented 9 years ago

@peacememories is this related to #4 ?

peacememories commented 9 years ago

@PixnBits not as far as I can tell. #4 was caused by missing replication of the parent environment to the spawn, this is caused by the incompatibility of Python 2 and 3, and how that problem is solved in most linux distributions.

jsantell commented 9 years ago

@PixnBits @peacememories what're your npm accounts so i can give y'all publish permission

peacememories commented 9 years ago

Just created one. Same as on here, peacememories

PixnBits commented 9 years ago

pixnbits, srry

jsantell commented 9 years ago

@PixnBits @peacememories added you both, thank you!

PixnBits commented 9 years ago

Thank you, good sir!