@@ -55,53 +55,26 @@ def parse_args():
5555 action = "store_true" ,
5656 help = "print output as JSON (instead of line by line)" ,
5757 )
58+ parser .add_argument (
59+ "--features" ,
60+ action = "store" ,
61+ help = "which features to enable when building RustPython (default: ssl)" ,
62+ default = "ssl" ,
63+ )
5864
5965 args = parser .parse_args ()
6066 return args
6167
6268
6369args = parse_args ()
6470
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-
9871# CPython specific modules (mostly consisting of templates/tests)
9972CPYTHON_SPECIFIC_MODS = {
10073 'xxmodule' , 'xxsubtype' , 'xxlimited' , '_xxtestfuzz' ,
10174 '_testbuffer' , '_testcapi' , '_testimportmultiple' , '_testinternalcapi' , '_testmultiphase' , '_testlimitedcapi'
10275}
10376
104- IGNORED_MODULES = {"this" , "antigravity" } | PEP_594_MODULES | CPYTHON_SPECIFIC_MODS
77+ IGNORED_MODULES = {"this" , "antigravity" } | CPYTHON_SPECIFIC_MODS
10578
10679sys .path = [
10780 path
@@ -446,9 +419,9 @@ def remove_one_indent(s):
446419 f .write (output + "\n " )
447420
448421
449- subprocess .run (["cargo" , "build" , "--release" , "--features=ssl " ], check = True )
422+ subprocess .run (["cargo" , "build" , "--release" , f "--features={ args . features } " ], check = True )
450423result = subprocess .run (
451- ["cargo" , "run" , "--release" , "--features=ssl " , "-q" , "--" , GENERATED_FILE ],
424+ ["cargo" , "run" , "--release" , f "--features={ args . features } " , "-q" , "--" , GENERATED_FILE ],
452425 env = {** os .environ .copy (), "RUSTPYTHONPATH" : "Lib" },
453426 text = True ,
454427 capture_output = True ,
0 commit comments