PSA: python2 deprecation and removal is coming

42 views
Skip to first unread message

Sam Clegg

unread,
Jul 21, 2020, 1:17:50 PM7/21/20
to emscripte...@googlegroups.com
Historically emscripten and emsdk have supported both python2 and python3.

We were blocked on python2 removal due to the fact that we had no bundled python for mac as part of the emsdk and we didn't want to force emsdk users to install python3 via some other mechanism.

As of today we now bundle python3 with mac version of emsdk:

If you are a macOS users please let me know if you notice any issues with this.

Following on from that we will start warning if you use emscripten with python2:

And the plan is to then remove python2 support completely in a release or two.

Hopefully no concerns here given that python2 very dead these days.

BTW, I timagine will still continue to support python2 in emsdk.py so that mac users can bootstrap themselves using /usr/bin/python2 that comes with macOS.

cheers,
sam

ema...@cfa.harvard.edu

unread,
Jul 22, 2020, 8:18:24 AM7/22/20
to emscripten-discuss
I'm glad to use Python3, but FYI regarding the discussion in https://github.com/emscripten-core/emsdk/pull/561: on my Mac running 10.14, I do need root to change /usr/local:

% ls -ld /usr/local
drwxr-xr-x  14 root  wheel  448 Jun 10 07:14 /usr/local

% ls -ld /usr/local/*
drwxr-xr-x  105 root  wheel  3360 Jun 12 10:32 /usr/local/bin
drwxr-xr-x    7 root  wheel   224 Oct 30  2018 /usr/local/gfortran
drwxr-xr-x   12 root  wheel   384 Jun  4 15:49 /usr/local/include
drwxr-xr-x    5 root  wheel   160 Feb 21  2019 /usr/local/info
drwxr-xr-x   49 root  wheel  1568 Jun  4 15:49 /usr/local/lib
drwxr-xr-x    2 root  wheel    64 Jun  9  2019 /usr/local/libexec
drwxr-xr-x    3 root  wheel    96 Feb 21  2019 /usr/local/man
drwxr-xr-x    9 root  wheel   288 Jun  4 15:33 /usr/local/share

% mkdir /usr/local/opt
mkdir: /usr/local/opt/: Permission denied

I'm  not using homebrew, so I don't know if there is something special about their/your configuration or something obsolete about mine ... but over the course of many versions of OSX/macOS, I've never been able to write to /usr/local without root ...

Eric

Sam Clegg

unread,
Jul 22, 2020, 12:42:33 PM7/22/20
to emscripte...@googlegroups.com
The version of python that we bundle in emsdk won't depend on /usr/local at all or writing to it.

(I don't know how to explain the fact that homebrew requires the use or /usr/local but also is strongly against the use of sudo.. but we don't need to answer that question since we are not using it).

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/7f0f178c-8e7b-4dc3-a6b3-09b1af8fd21bn%40googlegroups.com.

ema...@cfa.harvard.edu

unread,
Jul 22, 2020, 2:09:22 PM7/22/20
to emscripten-discuss
Probably  I'm missing something, but the new scripts/update_python.py seems to have these lines:

os.remove('/usr/local/opt/openssl/lib/libssl.dylib') 
os.remove('/usr/local/opt/openssl/lib/libcrypto.dylib')

which normally will fail unless /usr/local/opt and below have acls set specially.

Sam Clegg

unread,
Jul 22, 2020, 3:05:00 PM7/22/20
to emscripte...@googlegroups.com
That script is only run by someone who wants to bundle a new version of python.  It produces the python binary that gets uploaded to cloud storage.

It is not run on your machine or any machine that runs emsdk.

cheers,
sam

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

ema...@cfa.harvard.edu

unread,
Jul 22, 2020, 3:12:52 PM7/22/20
to emscripten-discuss
OK, thanks, sorry for the confusion ...

Reply all
Reply to author
Forward
0 new messages