File tree 4 files changed +14
-9
lines changed 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 6
6
name : CI
7
7
8
8
env :
9
- VCPKGRS_DYNAMIC : 1
9
+ CARGO_ARGS : --all --features ssl
10
10
11
11
jobs :
12
12
rust_tests :
33
33
uses : actions-rs/cargo@v1
34
34
with :
35
35
command : test
36
- args : --verbose --all
36
+ args : --verbose ${{ env.CARGO_ARGS }}
37
37
38
38
snippets_cpython :
39
39
name : Run snippets and cpython tests
59
59
uses : actions-rs/cargo@v1
60
60
with :
61
61
command : build
62
- args : --release --verbose --all
62
+ args : --release --verbose ${{ env.CARGO_ARGS }}
63
63
- uses : actions/setup-python@v1
64
64
with :
65
65
python-version : 3.8
74
74
run : pipenv run pytest -v
75
75
working-directory : ./tests
76
76
- name : run cpython tests
77
- run : cargo run -- release -- -m test -v
77
+ run : target/ release/rustpython -m test -v
78
78
env :
79
79
RUSTPYTHONPATH : ${{ github.workspace }}/Lib
80
80
if : runner.os != 'Windows'
99
99
uses : actions-rs/cargo@v1
100
100
with :
101
101
command : clippy
102
- args : --all -- -Dwarnings
102
+ args : ${{ env.CARGO_ARGS }} -- -Dwarnings
103
103
104
104
lint :
105
105
name : Lint Python code with flake8
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ path = "./benchmarks/bench.rs"
18
18
flame-it = [" rustpython-vm/flame-it" , " flame" , " flamescope" ]
19
19
freeze-stdlib = [" rustpython-vm/freeze-stdlib" ]
20
20
21
+ ssl = [" rustpython-vm/ssl" ]
22
+
21
23
[dependencies ]
22
24
log = " 0.4"
23
25
env_logger = " 0.7"
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ vm-tracing-logging = []
14
14
flame-it = [" flame" , " flamer" ]
15
15
freeze-stdlib = []
16
16
17
+ ssl = [" openssl" , " openssl-sys" , " openssl-probe" ]
18
+
17
19
[dependencies ]
18
20
# Crypto:
19
21
digest = " 0.8.1"
@@ -99,9 +101,9 @@ gethostname = "0.2.0"
99
101
subprocess = " 0.2.2"
100
102
socket2 = { version = " 0.3" , features = [" unix" ] }
101
103
rustyline = " 6.0"
102
- openssl = { version = " 0.10" , features = [" vendored" ] }
103
- openssl-sys = " 0.9"
104
- openssl-probe = " 0.1"
104
+ openssl = { version = " 0.10" , features = [" vendored" ], optional = true }
105
+ openssl-sys = { version = " 0.9" , optional = true }
106
+ openssl-probe = { version = " 0.1" , optional = true }
105
107
106
108
[target .'cfg(any(not(target_arch = "wasm32"), target_os = "wasi"))' .dependencies ]
107
109
num_cpus = " 1"
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ mod pwd;
53
53
mod select;
54
54
#[ cfg( not( target_arch = "wasm32" ) ) ]
55
55
pub mod signal;
56
- #[ cfg( not( target_arch = "wasm32" ) ) ]
56
+ #[ cfg( all ( not( target_arch = "wasm32" ) , feature = "ssl ") ) ]
57
57
mod ssl;
58
58
#[ cfg( not( target_arch = "wasm32" ) ) ]
59
59
mod subprocess;
@@ -125,6 +125,7 @@ pub fn get_module_inits() -> HashMap<String, StdlibInitFunc> {
125
125
) ;
126
126
modules. insert ( "signal" . to_owned ( ) , Box :: new ( signal:: make_module) ) ;
127
127
modules. insert ( "select" . to_owned ( ) , Box :: new ( select:: make_module) ) ;
128
+ #[ cfg( feature = "ssl" ) ]
128
129
modules. insert ( "_ssl" . to_owned ( ) , Box :: new ( ssl:: make_module) ) ;
129
130
modules. insert ( "_subprocess" . to_owned ( ) , Box :: new ( subprocess:: make_module) ) ;
130
131
#[ cfg( not( target_os = "redox" ) ) ]
You can’t perform that action at this time.
0 commit comments