Skip to content

Commit 4dd1252

Browse files
committed
EXT_SUFFIX
1 parent a82ca35 commit 4dd1252

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

crates/vm/src/stdlib/sysconfig.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,19 @@ pub(crate) mod sysconfig {
77
#[pyfunction]
88
fn config_vars(vm: &VirtualMachine) -> PyDictRef {
99
let vars = vm.ctx.new_dict();
10+
11+
// FIXME: This is an entirely wrong implementation of EXT_SUFFIX.
12+
// EXT_SUFFIX must be a string starting with "." for pip compatibility
13+
// Using ".pyd" causes pip's _generic_abi() to fall back to _cpython_abis()
14+
vars.set_item("EXT_SUFFIX", ".pyd".to_pyobject(vm), vm)
15+
.unwrap();
16+
vars.set_item("SOABI", vm.ctx.none(), vm).unwrap();
17+
1018
vars.set_item("Py_GIL_DISABLED", true.to_pyobject(vm), vm)
1119
.unwrap();
20+
vars.set_item("Py_DEBUG", false.to_pyobject(vm), vm)
21+
.unwrap();
22+
1223
vars
1324
}
1425
}

0 commit comments

Comments
 (0)