Commit graph

167 commits

Author SHA1 Message Date
Patrick Westerhoff
3bcb1720e4 Add support for the Python launcher on Windows
When looking for a Python executable on Windows, before falling back to
guessing the default location or failing completely, attempt to use the
Python launcher to figure out the location of the Python executable.

The Python launcher is being distributed by default with Python
distributions on Windows, and is placed in the %WINDIR% folder (which is
in the PATH). This allows us to locate a Python installation even if it
was installed without putting the python.exe executable itself into the
PATH.

Because the Python launcher supports all versions of Python, we have to
explicitly request a Python 2 version. This is done by supplying "-2" as
the first command line argument. Since "py.exe -2" would be an invalid
executable for "execFile", we have to use the launcher to figure out where
the actual "python.exe" executable is located.

PR-URL: https://github.com/nodejs/node-gyp/pull/894
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-31 13:28:41 +02:00
Refael Ackermann
268f1ca4c7 Use result of which when searching for python.
Fixes: https://github.com/nodejs/node-gyp/issues/667
Fixes: https://github.com/nodejs/node-gyp/issues/750
PR-URL: https://github.com/nodejs/node-gyp/pull/668
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-11-24 15:06:13 +01:00
Ben Noordhuis
817ed9bd78 Add test for python executable search logic.
Break out the search logic into a separate function and add a regression
test.

References: https://github.com/nodejs/node-gyp/pull/668
PR-URL: https://github.com/nodejs/node-gyp/pull/756
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-11-24 14:59:38 +01:00
Michael Dawson
9bfa0876b4 Add support for AIX
For AIX we need to use gmake.

For AIX we need to set up the path to the exp file which contains the
symbols needed for linking.  The file will either be in one of the
following depeding on whether are are in installed or development
environment:

  - the include/node directory
  - the out/Release directory

PR-URL: https://github.com/nodejs/node-gyp/pull/753
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-11-18 18:23:36 +01:00
Rod Vagg
938dd18d1c refactor for clarity, fix dist-url, add env var dist-url functionality
PR-URL: https://github.com/nodejs/node-gyp/pull/711
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-08 10:01:07 +10:00
Rod Vagg
9e9df66a06 use process.release, make aware of io.js & node v4 differences
PR-URL: https://github.com/nodejs/node-gyp/pull/711
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-08 09:59:31 +10:00
Yonggang Luo
9a2637e8d8 Setting NODE_GYP_DIR for addon.gypi to setting absolute path for src/win_delay_load_hook.c,
and fixes of the long relative path issue on Win32.
Fixes of #636
2015-05-31 09:36:35 +08:00
Nathan Rajlich
4dd6b1df0f configure: try/catcht the semver range.test() call
Should fix #621.
2015-05-28 11:09:59 -07:00
Nathan Rajlich
78a6e07a64 configure: fix "python" fallback logic
/cc @bendavis78. Part of #527.
2015-05-24 14:50:09 -07:00
Nathan Rajlich
ff88e5fd12 configure: use "path-array" for PYTHONPATH 2015-05-24 14:45:17 -07:00
Nathan Rajlich
b305567a6a configure: remove trailing semis 2015-05-24 14:45:17 -07:00
Nathan Rajlich
1d48609187 Merge pull request #527 from bendavis78/issue_526
Fixed #526. Check for python2 executable by default, fallback to python
2015-05-24 14:43:15 -07:00
Ben Davis
cf0ddf6aa4 Fixed #526. Check for python2 executable by default, fallback to python 2014-11-05 14:16:14 -06:00
Tim Cuthbertson
d592067624 configure: don't clobber existing $PYTHONPATH 2014-10-02 13:47:39 +10:00
Patryk Zawadzki
52e8d9f70d Make Python prefer bundled files
As Python has no concept of node packages, it will load whatever comes first in `sys.path`. Here we help Python by making sure files bundled in this node package are the preferred path when looking for imports.
2014-05-07 02:10:38 +02:00
Nathan Rajlich
e1824656c9 configure: inherit from process.env when probing for the python version number
See https://groups.google.com/d/topic/nodejs/qzF9rdMjg6k/discussion
Closes #409
2014-03-04 14:36:36 -08:00
Nathan Rajlich
e5ae8e162b configure: remove semicolons 2014-03-04 14:32:04 -08:00
getwe
5b51ae6941 not parallel processing gyp file
I'm working on a old platforms,when I run ```node-gyp configure```,node-gyp report one error of python 
> ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

check this : http://bugs.python.org/issue3770

I suggest not parallel processing because usually we don't have so manay files to parse.

github.com/joyent/node had closed the issue of the same problem,see :

https://github.com/joyent/node/issues/6640
2014-02-27 10:13:06 +08:00
Jay Beavers
e7351e9a56 Merge branch 'master' of https://github.com/TooTallNate/node-gyp into updateGypMSVS 2013-11-11 18:42:38 -08:00
Nathan Rajlich
78aeff49db configure: update gyp invocation script path 2013-11-11 15:47:31 -08:00
Jay Beavers
3f4775f143 Update gyp for VS 2013 support, simplify configure logic to rely on gyp for detecting visual studio' 2013-11-11 11:18:00 -08:00
Nathan Rajlich
f28088a045 Merge pull request #300 from icosahedron/master
Handle when both VS2010 and VS2012 Express are installed
2013-10-19 23:09:15 -07:00
Nathan Rajlich
e04a99d508 Merge pull request #294 from pflannery/master
adds vs2012-full check support to "node-gyp configure"
2013-09-16 07:48:45 -07:00
Nathan Rajlich
1fbf1961db configure: fix log.verbose() call 2013-08-24 17:38:17 -07:00
Jay Kint
8683992d76 Handle when both VS2010 and VS2012 are installed
When both versions are present, attempt to use the command prompt to
determine which one should be set.

The command prompt for VS2012 set the environment variable to:

VisualStudioVersion=11.0

This environment variable is absent in the VS2010 command prompts.

Also, presumably the checkVCExpress function not setting hasVCExpress
was an oversight.
2013-07-27 23:18:17 -07:00
pflannery
9ac34f40ed adds vs2012-full check support to "node-gyp configure" 2013-07-20 15:29:54 +01:00
Nathan Rajlich
3c10f5db90 configure: strip "rc" from Python version number
Fixes #279.
2013-06-30 14:31:40 -07:00
Nathan Rajlich
a50187bf9d configure: guard against the possibility of semver.parse() throwing
Not really sure if this ever happens, but just in case...
2013-06-30 14:18:02 -07:00
Nathan Rajlich
0ffd1ca276 configure: use a semver Range object for checking the Python version 2013-06-30 14:17:46 -07:00
Nathan Rajlich
90cc603406 configure: pass the PATH to the python execFile() call 2013-03-08 17:34:56 -08:00
Nathan Rajlich
5ce4df0034 configure: remove unused "exec" variable 2013-03-08 17:34:46 -08:00
Nathan Rajlich
078ab27480 disable "thin" static libraries by default
Older linkers don't have the -T flag.

This is a somewhat experimental feature, so if user's want "thin"
archives, they can specify `--thin` to revert to the original behavior.
2013-03-08 15:42:19 -08:00
Nathan Rajlich
2cff43f851 Merge pull request #200 from hitsthings/master
Fixes #198
2013-02-28 15:24:20 -08:00
root
8976213a8f configure: prevent ANSI escape codes in stdout of Python version check
Closes #205.
2013-02-28 15:22:42 -08:00
Adam Ahmed
deac0621ce For #198 - if VC2010 x86 exists, still check VC2012 2013-02-18 21:08:53 +11:00
Adam Ahmed
7d953c2a04 For #198 - always check existence of both VC2010Express and VC2012Express so if either prerequisite is met, we can use that build configuration. 2013-02-18 21:01:06 +11:00
Nathan Rajlich
89c135454e configure: don't inherit the process.config.defaults
This has been something I've been thinking about for a while now and I
finally just got my first bug report for it, so I think emptying out
these values is in fact the correct behavior.
2013-02-04 15:28:25 -08:00
Nathan Rajlich
569859e0dc configure: use Python 3 compatible syntax when checking the python version
Closes #166.
2012-12-11 08:52:59 -08:00
Nathan Rajlich
9cafddd9a5 configure: run the bundled gyp rather than the one from the tarball 2012-11-14 16:42:34 -08:00
Nathan Rajlich
66bf1c2d79 configure: remove trailing semicolons 2012-11-13 18:43:46 -08:00
Nathan Rajlich
2e5e6a66a8 configure: add support for "config.gypi" and "commong.gypi" files
When present alongside the "binding.gyp" file. This gives addons a chance to
overwrite default variables specified in the gyp files of the native addon's
gyp dependencies.
2012-11-13 18:41:25 -08:00
Nathan Rajlich
9accea1371 configure: specify msvs version "auto"
This parallels joyent/node@cfbfaaa87d
2012-11-03 17:56:46 -07:00
Nathan Rajlich
d0c058749a configure: fix lint 2012-11-03 17:56:00 -07:00
Frederico Silva
63a3426e5d Add Windows 8 and MSVC 2012 support.
Closes #149.

Squashed commit of the following:

commit 73af25446d6cb71310f54d354d24e27028c9b64b
Author: Frederico Silva <frederico.silva@gmail.com>
Date:   Tue Oct 23 17:46:38 2012 +0100

    add windows 8 sdk check

commit 37077ef13a7d69d7bbfcf563ed13cea28b4c4599
Author: Frederico Silva <frederico.silva@gmail.com>
Date:   Sat Oct 20 17:12:30 2012 +0100

    remove arch check

commit 731b001e333c86c62fc8594eb6b594eb1f0bb07e
Author: Frederico Silva <frederico.silva@gmail.com>
Date:   Sat Oct 20 16:34:02 2012 +0100

    add windows 8 32 bits support

commit 5ce8be893959b092952a9a49990e8ff7a24ae68f
Author: Frederico Silva <frederico.silva@gmail.com>
Date:   Fri Oct 19 02:33:48 2012 +0100

    remove debug log

commit b3705b62b207ceda6c5f1a42e3f7e5500498949c
Author: Frederico Silva <frederico.silva@gmail.com>
Date:   Fri Oct 19 00:56:12 2012 +0100

    check VS2012Express and set toolset
2012-10-29 16:55:14 -07:00
Nathan Rajlich
ff4392265a configure: make a command-line specified python override the env variable
I need better config things...
2012-10-02 11:30:55 -07:00
Nathan Rajlich
4578dac635 configure: remove all "+" signs from the Python version 2012-09-07 11:07:37 -07:00
Nathan Rajlich
d1143352b8 configure: strip "+" signs from the Python version before comparing
Fixes #129.
2012-08-30 14:09:25 -07:00
Nathan Rajlich
85a5009243 configure: use "platform.python_version()" to check the Python version
This should be more resilient across various different Python distributions.

Closes #125.
2012-08-21 16:41:52 -07:00
Nathan Rajlich
4f8b057b89 configure: a little cleanup 2012-08-12 14:31:16 -07:00
Nathan Rajlich
d770292b99 configure: port the gyp_addon login into the "configure" step
Now `tools/gyp_addon` can be removed from the node repo.
Part of joyent/node#3760.
2012-08-12 14:27:59 -07:00