Граф коммитов

22 Коммитов

Автор SHA1 Сообщение Дата
Sam Clegg a85b303873
Require python3 (#11836)
In prep for emscripten 2.0.0 require drop support for python2

Fixes: #7198
2020-08-07 09:41:49 -07:00
Sam Clegg e0702c9e27
Honor EMSDK_PYTHON in `bat` and `sh` launcher scripts (#11611) 2020-07-10 14:06:41 -07:00
osen 71220ab4e3
Minor fix for run_python.sh to work with POSIX sh on FreeBSD. (#11426)
Co-authored-by: Karsten Pedersen <kpedersen@outlook.com>
2020-06-16 08:47:13 -07:00
Egor Suvorov 552223616a
Fix #11005: escape path to Python executable in entry points (#11006) 2020-04-30 17:30:04 -07:00
Sam Clegg 1c6e796687
Stop using symlinks for shell script launchers (#10921)
For windows users that use MINGW the shell scripts as still useful
(preferable to the .bat scripts) but they don't support symlink.

Add a little script for managing these entry points.
This change was mostly mechanically created by running this script.
2020-04-15 10:27:21 -07:00
Sam Clegg d5c77b06a5
Remove python_selector.py in favor of run_python.sh (#10729)
Ubuntu 20.04 dropped the /usr/bin/python symlink so it is no longer
possible use `/usr/bin/env python` in launcher scripts and then
rely on python_selector.py to select a different python version.

Instead we go back to age-old method of using shell wrapper script.

Here I create a single wrapper script called run_python.sh which
runs a commmand under the best version of python it can find.  Each
unsiffixed command is then a symbol link to this shell script.  Since
windows users use the .bat files it shouldn't matter whether or not
these symlinks work on windows.

Fixes #10726
2020-03-20 11:23:45 -07:00
Alon Zakai be97a5152e
fix regression in 1.37.37 from 9a5a9b6224 : configure scripts should be pointed to emcc, not emcc.py, since emcc will pick the right python version. (#6460) 2018-04-18 19:13:33 -07:00
Kagami Sascha Rosylight f067c2ab76 Allow Python 3 (#5967)
*   introduces EMSCRIPTEN_ALLOW_NEWER_PYTHON to allow Python 3
 *   creates force_python_version.py to conditionally force Python 2
 *   separates colored logger as colored_logger.py
 *   uses emcc.py instead of emcc internally
 *   adds a test
 *   lets CircleCI test on Python 3 while Travis still tests on Python 2
2018-01-11 12:46:13 -08:00
Zhiming Wang 254aae2286 Resolve symlinks in em* wrapper scripts (#5534)
When wrapper scripts em* in PATH are symlinks to the actual scripts
installed alongside em*.py (e.g. in the case of a Homebrew
installation), we need to resolve symlinks in order to find em*.py.
2017-08-29 16:41:01 -07:00
Jukka Jylanki 5221d57667 Python imports take time too, so record toolchain profiler process starts before the imports take place. Also filter out multiple process start and finish records, which is simplest to do in the toolchain_profiler side rather than strictly tracking on the caller side. 2017-02-14 10:33:46 +02:00
Jukka Jylänki ad135a18c1 Implement Emscripten toolchain profiler which can be used to profile the process-wide execution of the toolchain in action. 2016-08-17 23:56:56 +03:00
Jukka Jylänki 11e0e7e1ec Fix Windows multiprocessing/forking import of emcc and em++. Windows python 2.7 insists on finding em++.py and does not look up em++. Closes #3939. 2015-12-19 16:21:36 +02:00
Alon Zakai bcc5d85ea9 clean up emcc and em++ 2015-11-16 11:21:44 -08:00
Alon Zakai 62e55bea93 make em++ compatible with python 2 and 3 2015-11-16 11:17:55 -08:00
Alon Zakai 16d378c78f do not use an env var to communicate c++ mode 2015-01-01 19:48:54 -08:00
Pierre Renaux 66d585fcd3 [em++]: Removed unnecessary warning about the PYTHON variable ; 2013-11-04 19:27:11 +08:00
Alon Zakai ae236b288c warn in em++ if PYTHON is not defined properly 2013-08-09 16:48:05 -07:00
Alan Kligman a2bc9a30de Updated to add a PYTHON config option instead of defaulting to python2. This should preserve the default behavior in a way that can be overridden. 2012-12-19 18:06:48 -05:00
Alan Kligman 315f13e5a1 Updated scripts to call python2 directly rather than relying on python symlink pointing to the right place. See PEP394 for details on why this should be OK. 2012-12-19 18:06:48 -05:00
Sigmund Vik f829735cc3 Misc fixes for Windows.
Most of these changes have to do with how python scripts are invoked.

For Linux, 'Popen([EMCC] + args)' works because the first line in emcc
is '#!/usr/bin/env python'. On Windows, the python interpreter has
to be explicitly invoked, e.g. 'Popen(['python', EMCC] + args)'. Note
that there is no harm in explicitly invoking the python interpreter
on Linux, so this works on both platforms.

For Windows, execvp() behaves differently than on Linux:
http://mail.python.org/pipermail/python-list/2002-July/763863.html
http://msdn.microsoft.com/en-us/library/3xw6zy53.aspx

This causes many strange things to happen as the parent process
terminated before its children. In this change the use of execvp()
has been replaced with subprocess.call().

This change also fixes some code that assumed that the path separator
always is '/', but for Windows it is '\'. And where the path module
can be required, we use path.normalize() and path.resolve() to check
if a filename is absolute in a platform agnostic manner.
2012-03-20 14:26:50 +01:00
Alon Zakai 58f694a190 emcc: --version 2011-12-11 10:23:03 -08:00
Alon Zakai 753437a56d emcc stuff 2011-11-22 21:34:03 -08:00