@@ -55,53 +55,26 @@ def parse_args():
55
55
action = "store_true" ,
56
56
help = "print output as JSON (instead of line by line)" ,
57
57
)
58
+ parser .add_argument (
59
+ "--features" ,
60
+ action = "store" ,
61
+ help = "which features to enable when building RustPython (default: ssl)" ,
62
+ default = "ssl" ,
63
+ )
58
64
59
65
args = parser .parse_args ()
60
66
return args
61
67
62
68
63
69
args = parse_args ()
64
70
65
-
66
- # modules suggested for deprecation by PEP 594 (www.python.org/dev/peps/pep-0594/)
67
- # some of these might be implemented, but they are not a priority
68
- PEP_594_MODULES = {
69
- "aifc" ,
70
- "asynchat" ,
71
- "asyncore" ,
72
- "audioop" ,
73
- "binhex" ,
74
- "cgi" ,
75
- "cgitb" ,
76
- "chunk" ,
77
- "crypt" ,
78
- "formatter" ,
79
- "fpectl" ,
80
- "imghdr" ,
81
- "imp" ,
82
- "macpath" ,
83
- "msilib" ,
84
- "nntplib" ,
85
- "nis" ,
86
- "ossaudiodev" ,
87
- "parser" ,
88
- "pipes" ,
89
- "smtpd" ,
90
- "sndhdr" ,
91
- "spwd" ,
92
- "sunau" ,
93
- "telnetlib" ,
94
- "uu" ,
95
- "xdrlib" ,
96
- }
97
-
98
71
# CPython specific modules (mostly consisting of templates/tests)
99
72
CPYTHON_SPECIFIC_MODS = {
100
73
'xxmodule' , 'xxsubtype' , 'xxlimited' , '_xxtestfuzz' ,
101
74
'_testbuffer' , '_testcapi' , '_testimportmultiple' , '_testinternalcapi' , '_testmultiphase' , '_testlimitedcapi'
102
75
}
103
76
104
- IGNORED_MODULES = {"this" , "antigravity" } | PEP_594_MODULES | CPYTHON_SPECIFIC_MODS
77
+ IGNORED_MODULES = {"this" , "antigravity" } | CPYTHON_SPECIFIC_MODS
105
78
106
79
sys .path = [
107
80
path
@@ -446,9 +419,9 @@ def remove_one_indent(s):
446
419
f .write (output + "\n " )
447
420
448
421
449
- subprocess .run (["cargo" , "build" , "--release" , "--features=ssl " ], check = True )
422
+ subprocess .run (["cargo" , "build" , "--release" , f "--features={ args . features } " ], check = True )
450
423
result = subprocess .run (
451
- ["cargo" , "run" , "--release" , "--features=ssl " , "-q" , "--" , GENERATED_FILE ],
424
+ ["cargo" , "run" , "--release" , f "--features={ args . features } " , "-q" , "--" , GENERATED_FILE ],
452
425
env = {** os .environ .copy (), "RUSTPYTHONPATH" : "Lib" },
453
426
text = True ,
454
427
capture_output = True ,
0 commit comments