File tree Expand file tree Collapse file tree 3 files changed +12
-32
lines changed Expand file tree Collapse file tree 3 files changed +12
-32
lines changed Original file line number Diff line number Diff line change 81
81
name : install python deps
82
82
command : |
83
83
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
92
85
- run :
93
86
name : python3 flake8
94
87
command : |
@@ -138,22 +131,17 @@ jobs:
138
131
name : win/server-2019
139
132
shell : bash.exe
140
133
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"
146
134
PYTHONUNBUFFERED : " 1"
147
135
EMSDK_NOTTY : " 1"
148
136
steps :
149
137
- 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
+
153
140
- run :
154
141
name : Install latest
155
142
shell : cmd.exe
156
143
command : test\test.bat
144
+
157
145
- run :
158
146
name : test.py
159
147
command : |
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env python
1
+ #!/usr/bin/env python3
2
2
# Copyright 2019 The Emscripten Authors. All rights reserved.
3
3
# Emscripten is available under two separate licenses, the MIT license and the
4
4
# University of Illinois/NCSA Open Source License. Both these licenses can be
5
5
# found in the LICENSE file.
6
6
7
- from __future__ import print_function
8
-
9
7
import copy
10
8
from collections import OrderedDict
11
9
import errno
22
20
import sysconfig
23
21
import zipfile
24
22
if os .name == 'nt' :
25
- try :
26
- import winreg
27
- except ImportError :
28
- # old python 2 name
29
- import _winreg as winreg
23
+ import winreg
30
24
import ctypes .wintypes
31
25
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
39
29
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 )
40
33
41
34
emsdk_packages_url = 'https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/'
42
35
Original file line number Diff line number Diff line change 1
1
:: equivalent of test.sh as windows bat file
2
- set PATH = %PATH% ;%PYTHON_BIN%
3
2
CALL emsdk install latest
4
3
CALL emsdk activate latest
5
4
CALL emsdk_env.bat
You can’t perform that action at this time.
0 commit comments