File tree Expand file tree Collapse file tree 3 files changed +13
-32
lines changed Expand file tree Collapse file tree 3 files changed +13
-32
lines changed Original file line number Diff line number Diff line change 8181 name : install python deps
8282 command : |
8383 apt-get update -q
84- apt-get install -q -y python2 python3-pip
85- - run :
86- name : python2 flake8
87- command : |
88- curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
89- python2 get-pip.py
90- python2 -m pip install flake8==3.9.2
91- python2 -m flake8 --show-source --statistics --extend-exclude=./scripts
84+ apt-get install -q -y python3-pip
9285 - run :
9386 name : python3 flake8
9487 command : |
@@ -138,22 +131,18 @@ jobs:
138131 name : win/server-2019
139132 shell : bash.exe
140133 environment :
141- # We need python installed before we can test anytyhing.
142- # There seems to be undocument copy of python installed here. Hopefully
143- # if this disappears there will be another way of getting a re-installed
144- # version.
145- PYTHON_BIN : " C:\\ Python27amd64"
146134 PYTHONUNBUFFERED : " 1"
147135 EMSDK_NOTTY : " 1"
148136 steps :
149137 - checkout
150- - run :
151- name : Add python to bash path
152- command : echo "export PATH=\"$PATH:/c/python27amd64/\"" >> $BASH_ENV
138+ - run : where python
139+ - run : where python3
140+
153141 - run :
154142 name : Install latest
155143 shell : cmd.exe
156144 command : test\test.bat
145+
157146 - run :
158147 name : test.py
159148 command : |
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
1+ #!/usr/bin/env python3
22# Copyright 2019 The Emscripten Authors. All rights reserved.
33# Emscripten is available under two separate licenses, the MIT license and the
44# University of Illinois/NCSA Open Source License. Both these licenses can be
55# found in the LICENSE file.
66
7- from __future__ import print_function
8-
97import copy
108from collections import OrderedDict
119import errno
2220import sysconfig
2321import zipfile
2422if os .name == 'nt' :
25- try :
26- import winreg
27- except ImportError :
28- # old python 2 name
29- import _winreg as winreg
23+ import winreg
3024 import ctypes .wintypes
3125
32- if sys .version_info >= (3 ,):
33- from urllib .parse import urljoin
34- from urllib .request import urlopen
35- import functools
36- else :
37- from urlparse import urljoin
38- from urllib2 import urlopen
26+ from urllib .parse import urljoin
27+ from urllib .request import urlopen
28+ import functools
3929
30+ if sys .version_info < (3 , 0 ):
31+ print (f'error: emsdk requires python 3.0 or above ({ sys .executable } { sys .version } )' , file = sys .stderr )
32+ sys .exit (1 )
4033
4134emsdk_packages_url = 'https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/'
4235
Original file line number Diff line number Diff line change 11:: equivalent of test.sh as windows bat file
2- set PATH = %PATH% ;%PYTHON_BIN%
32CALL emsdk install latest
43CALL emsdk activate latest
54CALL emsdk_env.bat
You can’t perform that action at this time.
0 commit comments