File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed
Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 66name : CI
77
88env :
9- VCPKGRS_DYNAMIC : 1
9+ CARGO_ARGS : --all --features ssl
1010
1111jobs :
1212 rust_tests :
3333 uses : actions-rs/cargo@v1
3434 with :
3535 command : test
36- args : --verbose --all
36+ args : --verbose ${{ env.CARGO_ARGS }}
3737
3838 snippets_cpython :
3939 name : Run snippets and cpython tests
5959 uses : actions-rs/cargo@v1
6060 with :
6161 command : build
62- args : --release --verbose --all
62+ args : --release --verbose ${{ env.CARGO_ARGS }}
6363 - uses : actions/setup-python@v1
6464 with :
6565 python-version : 3.8
7474 run : pipenv run pytest -v
7575 working-directory : ./tests
7676 - name : run cpython tests
77- run : cargo run -- release -- -m test -v
77+ run : target/ release/rustpython -m test -v
7878 env :
7979 RUSTPYTHONPATH : ${{ github.workspace }}/Lib
8080 if : runner.os != 'Windows'
9999 uses : actions-rs/cargo@v1
100100 with :
101101 command : clippy
102- args : --all -- -Dwarnings
102+ args : ${{ env.CARGO_ARGS }} -- -Dwarnings
103103
104104 lint :
105105 name : Lint Python code with flake8
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ path = "./benchmarks/bench.rs"
1818flame-it = [" rustpython-vm/flame-it" , " flame" , " flamescope" ]
1919freeze-stdlib = [" rustpython-vm/freeze-stdlib" ]
2020
21+ ssl = [" rustpython-vm/ssl" ]
22+
2123[dependencies ]
2224log = " 0.4"
2325env_logger = " 0.7"
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ vm-tracing-logging = []
1414flame-it = [" flame" , " flamer" ]
1515freeze-stdlib = []
1616
17+ ssl = [" openssl" , " openssl-sys" , " openssl-probe" ]
18+
1719[dependencies ]
1820# Crypto:
1921digest = " 0.8.1"
@@ -99,9 +101,9 @@ gethostname = "0.2.0"
99101subprocess = " 0.2.2"
100102socket2 = { version = " 0.3" , features = [" unix" ] }
101103rustyline = " 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 }
105107
106108[target .'cfg(any(not(target_arch = "wasm32"), target_os = "wasi"))' .dependencies ]
107109num_cpus = " 1"
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ mod pwd;
5353mod select;
5454#[ cfg( not( target_arch = "wasm32" ) ) ]
5555pub mod signal;
56- #[ cfg( not( target_arch = "wasm32" ) ) ]
56+ #[ cfg( all ( not( target_arch = "wasm32" ) , feature = "ssl ") ) ]
5757mod ssl;
5858#[ cfg( not( target_arch = "wasm32" ) ) ]
5959mod subprocess;
@@ -125,6 +125,7 @@ pub fn get_module_inits() -> HashMap<String, StdlibInitFunc> {
125125 ) ;
126126 modules. insert ( "signal" . to_owned ( ) , Box :: new ( signal:: make_module) ) ;
127127 modules. insert ( "select" . to_owned ( ) , Box :: new ( select:: make_module) ) ;
128+ #[ cfg( feature = "ssl" ) ]
128129 modules. insert ( "_ssl" . to_owned ( ) , Box :: new ( ssl:: make_module) ) ;
129130 modules. insert ( "_subprocess" . to_owned ( ) , Box :: new ( subprocess:: make_module) ) ;
130131 #[ cfg( not( target_os = "redox" ) ) ]
You can’t perform that action at this time.
0 commit comments