File tree 5 files changed +16
-2
lines changed
5 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ fold = []
16
16
unparse = [" rustpython-literal" ]
17
17
visitor = []
18
18
all-nodes-with-ranges = []
19
+ malachite-bigint = [" dep:malachite-bigint" ]
20
+ num-bigint = [" dep:num-bigint" ]
19
21
20
22
[dependencies ]
21
23
rustpython-parser-core = { workspace = true }
Original file line number Diff line number Diff line change @@ -8,10 +8,16 @@ repository = { workspace = true }
8
8
license = { workspace = true }
9
9
rust-version = { workspace = true }
10
10
11
+ [features ]
12
+ default = [" malachite-bigint" ]
13
+ malachite-bigint = [" dep:malachite-bigint" ]
14
+ num-bigint = [" dep:num-bigint" ]
15
+
11
16
[dependencies ]
12
17
rustpython-literal = { workspace = true }
13
18
14
19
bitflags = { workspace = true }
15
20
itertools = { workspace = true }
16
- malachite-bigint = { workspace = true }
21
+ malachite-bigint = { workspace = true , optional = true }
22
+ num-bigint = { workspace = true , optional = true }
17
23
num-traits = { workspace = true }
Original file line number Diff line number Diff line change 1
1
//! Implementation of Printf-Style string formatting
2
2
//! as per the [Python Docs](https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting).
3
3
use bitflags:: bitflags;
4
+ #[ cfg( feature = "malachite-bigint" ) ]
4
5
use malachite_bigint:: { BigInt , Sign } ;
6
+ #[ cfg( feature = "num-bigint" ) ]
7
+ use num_bigint:: { BigInt , Sign } ;
5
8
use num_traits:: Signed ;
6
9
use rustpython_literal:: { float, format:: Case } ;
7
10
use std:: {
Original file line number Diff line number Diff line change 1
1
use itertools:: { Itertools , PeekingNext } ;
2
+ #[ cfg( feature = "malachite-bigint" ) ]
2
3
use malachite_bigint:: { BigInt , Sign } ;
4
+ #[ cfg( feature = "num-bigint" ) ]
5
+ use num_bigint:: { BigInt , Sign } ;
3
6
use num_traits:: FromPrimitive ;
4
7
use num_traits:: { cast:: ToPrimitive , Signed } ;
5
8
use rustpython_literal:: float;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ phf_codegen = "0.11.1"
24
24
tiny-keccak = { version = " 2" , features = [" sha3" ] }
25
25
26
26
[dependencies ]
27
- rustpython-ast = { workspace = true }
27
+ rustpython-ast = { workspace = true , default-features = false }
28
28
rustpython-parser-core = { workspace = true }
29
29
30
30
itertools = { workspace = true }
You can’t perform that action at this time.
0 commit comments