File tree 2 files changed +1
-22
lines changed 2 files changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,5 @@ serde_json = "1.0.93"
12
12
serde_repr = " 0.1.10"
13
13
regex = " 1.10.4"
14
14
15
- [features ]
16
- test = []
17
-
18
15
[lib ]
19
16
doctest = false
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use std::{
6
6
process:: Command ,
7
7
} ;
8
8
9
- fn get_version_impl ( path : & str ) -> Option < String > {
9
+ pub fn get_version ( path : & str ) -> Option < String > {
10
10
let output = Command :: new ( path)
11
11
. arg ( "-c" )
12
12
. arg ( "import sys; print(sys.version)" )
@@ -18,24 +18,6 @@ fn get_version_impl(path: &str) -> Option<String> {
18
18
Some ( output. to_string ( ) )
19
19
}
20
20
21
- #[ cfg( not( feature = "test" ) ) ]
22
- pub fn get_version ( path : & str ) -> Option < String > {
23
- get_version_impl ( path)
24
- }
25
-
26
- // Tests
27
-
28
- #[ cfg( feature = "test" ) ]
29
- pub fn get_version ( path : & str ) -> Option < String > {
30
- use std:: path:: PathBuf ;
31
- let version_file = PathBuf :: from ( path. to_owned ( ) + ".version" ) ;
32
- if version_file. exists ( ) {
33
- let version = std:: fs:: read_to_string ( version_file) . ok ( ) ?;
34
- return Some ( version. trim ( ) . to_string ( ) ) ;
35
- }
36
- get_version_impl ( path)
37
- }
38
-
39
21
pub fn find_python_binary_path ( env_path : & Path ) -> Option < PathBuf > {
40
22
let python_bin_name = if cfg ! ( windows) {
41
23
"python.exe"
You can’t perform that action at this time.
0 commit comments