Skip to content

Commit

Permalink
Add macOS python interpreter sysconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed May 4, 2022
1 parent 6448725 commit 205b3dd
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ jobs:
# non-abi3
cargo run -- build --no-sdist -i python3.9 -m test-crates/pyo3-mixed/Cargo.toml --target aarch64-unknown-linux-gnu --zig
cargo run -- build --no-sdist -i python3.9 -m test-crates/pyo3-mixed/Cargo.toml --target aarch64-apple-darwin --zig
# Check wheels with twine
twine check --strict test-crates/pyo3-mixed/target/wheels/*.whl
- name: test cross compiling windows abi3 wheel
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down
5 changes: 4 additions & 1 deletion src/python_interpreter/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ static WELLKNOWN_SYSCONFIG: Lazy<HashMap<Os, HashMap<Arch, Vec<InterpreterConfig
Lazy::new(|| {
let mut sysconfig = HashMap::new();
let sysconfig_linux = serde_json::from_slice(include_bytes!("sysconfig-linux.json"))
.expect("invalid sysconfig.json");
.expect("invalid sysconfig-linux.json");
sysconfig.insert(Os::Linux, sysconfig_linux);
let sysconfig_macos = serde_json::from_slice(include_bytes!("sysconfig-macos.json"))
.expect("invalid sysconfig-macos.json");
sysconfig.insert(Os::Macos, sysconfig_macos);
sysconfig
});

Expand Down
123 changes: 123 additions & 0 deletions src/python_interpreter/sysconfig-macos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"x86_64": [
{
"major": 3,
"minor": 6,
"abiflags": "m",
"interpreter": "cpython",
"ext_suffix": ".cpython-36m-darwin.so",
"abi_tag": "36m",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 7,
"abiflags": "m",
"interpreter": "cpython",
"ext_suffix": ".cpython-37m-darwin.so",
"abi_tag": "37m",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 8,
"abiflags": "",
"interpreter": "cpython",
"ext_suffix": ".cpython-38-darwin.so",
"abi_tag": "38",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 9,
"abiflags": "",
"interpreter": "cpython",
"ext_suffix": ".cpython-39-darwin.so",
"abi_tag": "39",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 10,
"abiflags": "",
"interpreter": "cpython",
"ext_suffix": ".cpython-310-darwin.so",
"abi_tag": "310",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 7,
"abiflags": "",
"interpreter": "pypy",
"ext_suffix": ".pypy37-pp73-darwin.so",
"abi_tag": "pp73",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 8,
"abiflags": "",
"interpreter": "pypy",
"ext_suffix": ".pypy38-pp73-darwin.so",
"abi_tag": "pp73",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 9,
"abiflags": "",
"interpreter": "pypy",
"ext_suffix": ".pypy39-pp73-darwin.so",
"abi_tag": "pp73",
"calcsize_pointer": 8
}
],
"aarch64": [
{
"major": 3,
"minor": 6,
"abiflags": "m",
"interpreter": "cpython",
"ext_suffix": ".cpython-36m-darwin.so",
"abi_tag": "36m",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 7,
"abiflags": "m",
"interpreter": "cpython",
"ext_suffix": ".cpython-37m-darwin.so",
"abi_tag": "37m",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 8,
"abiflags": "",
"interpreter": "cpython",
"ext_suffix": ".cpython-38-darwin.so",
"abi_tag": "38",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 9,
"abiflags": "",
"interpreter": "cpython",
"ext_suffix": ".cpython-39-darwin.so",
"abi_tag": "39",
"calcsize_pointer": 8
},
{
"major": 3,
"minor": 10,
"abiflags": "",
"interpreter": "cpython",
"ext_suffix": ".cpython-310-darwin.so",
"abi_tag": "310",
"calcsize_pointer": 8
}
]
}

0 comments on commit 205b3dd

Please sign in to comment.