maturin 1.9.4__tar.gz → 1.9.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of maturin might be problematic. Click here for more details.
- {maturin-1.9.4 → maturin-1.9.6}/.pre-commit-config.yaml +2 -2
- {maturin-1.9.4 → maturin-1.9.6}/Cargo.lock +114 -44
- {maturin-1.9.4 → maturin-1.9.6}/Cargo.toml +3 -3
- {maturin-1.9.4 → maturin-1.9.6}/Changelog.md +14 -1
- {maturin-1.9.4 → maturin-1.9.6}/PKG-INFO +1 -1
- {maturin-1.9.4 → maturin-1.9.6}/src/build_options.rs +18 -2
- {maturin-1.9.4 → maturin-1.9.6}/src/cross_compile.rs +3 -1
- {maturin-1.9.4 → maturin-1.9.6}/src/python_interpreter/mod.rs +251 -179
- {maturin-1.9.4 → maturin-1.9.6}/.cirrus.yml +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/.codespellrc +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/.config/nextest.toml +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/.gitignore +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/MANIFEST.in +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/README.md +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/clippy.toml +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/license-apache +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/license-mit +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/maturin/__init__.py +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/maturin/__main__.py +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/maturin/bootstrap.py +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/maturin.schema.json +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/netlify.toml +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/pyproject.toml +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/setup.py +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/audit.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/manylinux-policy.json +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/mod.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/musllinux-policy.json +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/musllinux.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/patchelf.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/platform_tag.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/policy.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/auditwheel/repair.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/bridge.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/build_context.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/cargo_toml.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/ci.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/compile.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/compression.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/develop.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/generate_json_schema.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/lib.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/main.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/metadata.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/module_writer.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/new_project.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/project_layout.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/pyproject_toml.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/python_interpreter/config.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/python_interpreter/get_interpreter_metadata.py +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/source_distribution.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/target/legacy_py.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/target/mod.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/target/pypi_tags.rs +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/.gitignore.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/Cargo.toml.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/__init__.py.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/build.rs.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/example.udl.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/lib.rs.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/main.rs.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/pyproject.toml.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/templates/test_all.py.j2 +0 -0
- {maturin-1.9.4 → maturin-1.9.6}/src/upload.rs +0 -0
|
@@ -56,12 +56,12 @@ repos:
|
|
|
56
56
|
)
|
|
57
57
|
- id: mixed-line-ending
|
|
58
58
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
59
|
-
rev: v0.
|
|
59
|
+
rev: v0.13.3
|
|
60
60
|
hooks:
|
|
61
61
|
- id: ruff-format
|
|
62
62
|
- id: ruff
|
|
63
63
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
64
|
-
rev: v1.
|
|
64
|
+
rev: v1.18.2
|
|
65
65
|
hooks:
|
|
66
66
|
- id: mypy
|
|
67
67
|
entry: mypy maturin/
|
|
@@ -493,13 +493,26 @@ version = "0.15.8"
|
|
|
493
493
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
494
494
|
checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
|
|
495
495
|
dependencies = [
|
|
496
|
-
"encode_unicode",
|
|
496
|
+
"encode_unicode 0.3.6",
|
|
497
497
|
"lazy_static",
|
|
498
498
|
"libc",
|
|
499
499
|
"unicode-width 0.1.13",
|
|
500
500
|
"windows-sys 0.52.0",
|
|
501
501
|
]
|
|
502
502
|
|
|
503
|
+
[[package]]
|
|
504
|
+
name = "console"
|
|
505
|
+
version = "0.16.0"
|
|
506
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
507
|
+
checksum = "2e09ced7ebbccb63b4c65413d821f2e00ce54c5ca4514ddc6b3c892fdbcbc69d"
|
|
508
|
+
dependencies = [
|
|
509
|
+
"encode_unicode 1.0.0",
|
|
510
|
+
"libc",
|
|
511
|
+
"once_cell",
|
|
512
|
+
"unicode-width 0.2.0",
|
|
513
|
+
"windows-sys 0.60.2",
|
|
514
|
+
]
|
|
515
|
+
|
|
503
516
|
[[package]]
|
|
504
517
|
name = "content_inspector"
|
|
505
518
|
version = "0.2.4"
|
|
@@ -634,7 +647,7 @@ version = "0.11.0"
|
|
|
634
647
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
635
648
|
checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de"
|
|
636
649
|
dependencies = [
|
|
637
|
-
"console",
|
|
650
|
+
"console 0.15.8",
|
|
638
651
|
"shell-words",
|
|
639
652
|
"thiserror 1.0.69",
|
|
640
653
|
"zeroize",
|
|
@@ -718,6 +731,12 @@ version = "0.3.6"
|
|
|
718
731
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
719
732
|
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
|
|
720
733
|
|
|
734
|
+
[[package]]
|
|
735
|
+
name = "encode_unicode"
|
|
736
|
+
version = "1.0.0"
|
|
737
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
738
|
+
checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
|
|
739
|
+
|
|
721
740
|
[[package]]
|
|
722
741
|
name = "encoding_rs"
|
|
723
742
|
version = "0.8.34"
|
|
@@ -983,8 +1002,8 @@ dependencies = [
|
|
|
983
1002
|
"aho-corasick",
|
|
984
1003
|
"bstr",
|
|
985
1004
|
"log",
|
|
986
|
-
"regex-automata
|
|
987
|
-
"regex-syntax
|
|
1005
|
+
"regex-automata",
|
|
1006
|
+
"regex-syntax",
|
|
988
1007
|
]
|
|
989
1008
|
|
|
990
1009
|
[[package]]
|
|
@@ -1194,7 +1213,7 @@ dependencies = [
|
|
|
1194
1213
|
"globset",
|
|
1195
1214
|
"log",
|
|
1196
1215
|
"memchr",
|
|
1197
|
-
"regex-automata
|
|
1216
|
+
"regex-automata",
|
|
1198
1217
|
"same-file",
|
|
1199
1218
|
"walkdir",
|
|
1200
1219
|
"winapi-util",
|
|
@@ -1217,7 +1236,7 @@ version = "0.17.9"
|
|
|
1217
1236
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1218
1237
|
checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281"
|
|
1219
1238
|
dependencies = [
|
|
1220
|
-
"console",
|
|
1239
|
+
"console 0.15.8",
|
|
1221
1240
|
"number_prefix",
|
|
1222
1241
|
"portable-atomic",
|
|
1223
1242
|
"unicode-width 0.2.0",
|
|
@@ -1236,7 +1255,7 @@ version = "1.43.1"
|
|
|
1236
1255
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1237
1256
|
checksum = "154934ea70c58054b556dd430b99a98c2a7ff5309ac9891597e339b5c28f4371"
|
|
1238
1257
|
dependencies = [
|
|
1239
|
-
"console",
|
|
1258
|
+
"console 0.15.8",
|
|
1240
1259
|
"once_cell",
|
|
1241
1260
|
"similar",
|
|
1242
1261
|
]
|
|
@@ -1427,16 +1446,16 @@ dependencies = [
|
|
|
1427
1446
|
|
|
1428
1447
|
[[package]]
|
|
1429
1448
|
name = "matchers"
|
|
1430
|
-
version = "0.
|
|
1449
|
+
version = "0.2.0"
|
|
1431
1450
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1432
|
-
checksum = "
|
|
1451
|
+
checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
|
|
1433
1452
|
dependencies = [
|
|
1434
|
-
"regex-automata
|
|
1453
|
+
"regex-automata",
|
|
1435
1454
|
]
|
|
1436
1455
|
|
|
1437
1456
|
[[package]]
|
|
1438
1457
|
name = "maturin"
|
|
1439
|
-
version = "1.9.
|
|
1458
|
+
version = "1.9.6"
|
|
1440
1459
|
dependencies = [
|
|
1441
1460
|
"anyhow",
|
|
1442
1461
|
"base64 0.21.7",
|
|
@@ -1451,7 +1470,7 @@ dependencies = [
|
|
|
1451
1470
|
"clap",
|
|
1452
1471
|
"clap_complete_command",
|
|
1453
1472
|
"configparser",
|
|
1454
|
-
"console",
|
|
1473
|
+
"console 0.16.0",
|
|
1455
1474
|
"dialoguer",
|
|
1456
1475
|
"dirs",
|
|
1457
1476
|
"dunce",
|
|
@@ -1637,12 +1656,11 @@ dependencies = [
|
|
|
1637
1656
|
|
|
1638
1657
|
[[package]]
|
|
1639
1658
|
name = "nu-ansi-term"
|
|
1640
|
-
version = "0.
|
|
1659
|
+
version = "0.50.1"
|
|
1641
1660
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1642
|
-
checksum = "
|
|
1661
|
+
checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399"
|
|
1643
1662
|
dependencies = [
|
|
1644
|
-
"
|
|
1645
|
-
"winapi",
|
|
1663
|
+
"windows-sys 0.52.0",
|
|
1646
1664
|
]
|
|
1647
1665
|
|
|
1648
1666
|
[[package]]
|
|
@@ -1723,12 +1741,6 @@ dependencies = [
|
|
|
1723
1741
|
"windows-sys 0.52.0",
|
|
1724
1742
|
]
|
|
1725
1743
|
|
|
1726
|
-
[[package]]
|
|
1727
|
-
name = "overload"
|
|
1728
|
-
version = "0.1.1"
|
|
1729
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1730
|
-
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
|
1731
|
-
|
|
1732
1744
|
[[package]]
|
|
1733
1745
|
name = "parking_lot"
|
|
1734
1746
|
version = "0.12.3"
|
|
@@ -2034,17 +2046,8 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
|
|
|
2034
2046
|
dependencies = [
|
|
2035
2047
|
"aho-corasick",
|
|
2036
2048
|
"memchr",
|
|
2037
|
-
"regex-automata
|
|
2038
|
-
"regex-syntax
|
|
2039
|
-
]
|
|
2040
|
-
|
|
2041
|
-
[[package]]
|
|
2042
|
-
name = "regex-automata"
|
|
2043
|
-
version = "0.1.10"
|
|
2044
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2045
|
-
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
|
2046
|
-
dependencies = [
|
|
2047
|
-
"regex-syntax 0.6.29",
|
|
2049
|
+
"regex-automata",
|
|
2050
|
+
"regex-syntax",
|
|
2048
2051
|
]
|
|
2049
2052
|
|
|
2050
2053
|
[[package]]
|
|
@@ -2055,15 +2058,9 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
|
|
2055
2058
|
dependencies = [
|
|
2056
2059
|
"aho-corasick",
|
|
2057
2060
|
"memchr",
|
|
2058
|
-
"regex-syntax
|
|
2061
|
+
"regex-syntax",
|
|
2059
2062
|
]
|
|
2060
2063
|
|
|
2061
|
-
[[package]]
|
|
2062
|
-
name = "regex-syntax"
|
|
2063
|
-
version = "0.6.29"
|
|
2064
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2065
|
-
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
|
2066
|
-
|
|
2067
2064
|
[[package]]
|
|
2068
2065
|
name = "regex-syntax"
|
|
2069
2066
|
version = "0.8.5"
|
|
@@ -2790,14 +2787,14 @@ dependencies = [
|
|
|
2790
2787
|
|
|
2791
2788
|
[[package]]
|
|
2792
2789
|
name = "tracing-subscriber"
|
|
2793
|
-
version = "0.3.
|
|
2790
|
+
version = "0.3.20"
|
|
2794
2791
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2795
|
-
checksum = "
|
|
2792
|
+
checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
|
|
2796
2793
|
dependencies = [
|
|
2797
2794
|
"matchers",
|
|
2798
2795
|
"nu-ansi-term",
|
|
2799
2796
|
"once_cell",
|
|
2800
|
-
"regex",
|
|
2797
|
+
"regex-automata",
|
|
2801
2798
|
"serde",
|
|
2802
2799
|
"serde_json",
|
|
2803
2800
|
"sharded-slab",
|
|
@@ -3174,6 +3171,15 @@ dependencies = [
|
|
|
3174
3171
|
"windows-targets 0.52.5",
|
|
3175
3172
|
]
|
|
3176
3173
|
|
|
3174
|
+
[[package]]
|
|
3175
|
+
name = "windows-sys"
|
|
3176
|
+
version = "0.60.2"
|
|
3177
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3178
|
+
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
|
|
3179
|
+
dependencies = [
|
|
3180
|
+
"windows-targets 0.53.2",
|
|
3181
|
+
]
|
|
3182
|
+
|
|
3177
3183
|
[[package]]
|
|
3178
3184
|
name = "windows-targets"
|
|
3179
3185
|
version = "0.48.5"
|
|
@@ -3198,13 +3204,29 @@ dependencies = [
|
|
|
3198
3204
|
"windows_aarch64_gnullvm 0.52.5",
|
|
3199
3205
|
"windows_aarch64_msvc 0.52.5",
|
|
3200
3206
|
"windows_i686_gnu 0.52.5",
|
|
3201
|
-
"windows_i686_gnullvm",
|
|
3207
|
+
"windows_i686_gnullvm 0.52.5",
|
|
3202
3208
|
"windows_i686_msvc 0.52.5",
|
|
3203
3209
|
"windows_x86_64_gnu 0.52.5",
|
|
3204
3210
|
"windows_x86_64_gnullvm 0.52.5",
|
|
3205
3211
|
"windows_x86_64_msvc 0.52.5",
|
|
3206
3212
|
]
|
|
3207
3213
|
|
|
3214
|
+
[[package]]
|
|
3215
|
+
name = "windows-targets"
|
|
3216
|
+
version = "0.53.2"
|
|
3217
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3218
|
+
checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef"
|
|
3219
|
+
dependencies = [
|
|
3220
|
+
"windows_aarch64_gnullvm 0.53.0",
|
|
3221
|
+
"windows_aarch64_msvc 0.53.0",
|
|
3222
|
+
"windows_i686_gnu 0.53.0",
|
|
3223
|
+
"windows_i686_gnullvm 0.53.0",
|
|
3224
|
+
"windows_i686_msvc 0.53.0",
|
|
3225
|
+
"windows_x86_64_gnu 0.53.0",
|
|
3226
|
+
"windows_x86_64_gnullvm 0.53.0",
|
|
3227
|
+
"windows_x86_64_msvc 0.53.0",
|
|
3228
|
+
]
|
|
3229
|
+
|
|
3208
3230
|
[[package]]
|
|
3209
3231
|
name = "windows_aarch64_gnullvm"
|
|
3210
3232
|
version = "0.48.5"
|
|
@@ -3217,6 +3239,12 @@ version = "0.52.5"
|
|
|
3217
3239
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3218
3240
|
checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
|
|
3219
3241
|
|
|
3242
|
+
[[package]]
|
|
3243
|
+
name = "windows_aarch64_gnullvm"
|
|
3244
|
+
version = "0.53.0"
|
|
3245
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3246
|
+
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
|
|
3247
|
+
|
|
3220
3248
|
[[package]]
|
|
3221
3249
|
name = "windows_aarch64_msvc"
|
|
3222
3250
|
version = "0.48.5"
|
|
@@ -3229,6 +3257,12 @@ version = "0.52.5"
|
|
|
3229
3257
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3230
3258
|
checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
|
|
3231
3259
|
|
|
3260
|
+
[[package]]
|
|
3261
|
+
name = "windows_aarch64_msvc"
|
|
3262
|
+
version = "0.53.0"
|
|
3263
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3264
|
+
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
|
|
3265
|
+
|
|
3232
3266
|
[[package]]
|
|
3233
3267
|
name = "windows_i686_gnu"
|
|
3234
3268
|
version = "0.48.5"
|
|
@@ -3241,12 +3275,24 @@ version = "0.52.5"
|
|
|
3241
3275
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3242
3276
|
checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
|
|
3243
3277
|
|
|
3278
|
+
[[package]]
|
|
3279
|
+
name = "windows_i686_gnu"
|
|
3280
|
+
version = "0.53.0"
|
|
3281
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3282
|
+
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
|
|
3283
|
+
|
|
3244
3284
|
[[package]]
|
|
3245
3285
|
name = "windows_i686_gnullvm"
|
|
3246
3286
|
version = "0.52.5"
|
|
3247
3287
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3248
3288
|
checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
|
|
3249
3289
|
|
|
3290
|
+
[[package]]
|
|
3291
|
+
name = "windows_i686_gnullvm"
|
|
3292
|
+
version = "0.53.0"
|
|
3293
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3294
|
+
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
|
|
3295
|
+
|
|
3250
3296
|
[[package]]
|
|
3251
3297
|
name = "windows_i686_msvc"
|
|
3252
3298
|
version = "0.48.5"
|
|
@@ -3259,6 +3305,12 @@ version = "0.52.5"
|
|
|
3259
3305
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3260
3306
|
checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
|
|
3261
3307
|
|
|
3308
|
+
[[package]]
|
|
3309
|
+
name = "windows_i686_msvc"
|
|
3310
|
+
version = "0.53.0"
|
|
3311
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3312
|
+
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
|
|
3313
|
+
|
|
3262
3314
|
[[package]]
|
|
3263
3315
|
name = "windows_x86_64_gnu"
|
|
3264
3316
|
version = "0.48.5"
|
|
@@ -3271,6 +3323,12 @@ version = "0.52.5"
|
|
|
3271
3323
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3272
3324
|
checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
|
|
3273
3325
|
|
|
3326
|
+
[[package]]
|
|
3327
|
+
name = "windows_x86_64_gnu"
|
|
3328
|
+
version = "0.53.0"
|
|
3329
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3330
|
+
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
|
|
3331
|
+
|
|
3274
3332
|
[[package]]
|
|
3275
3333
|
name = "windows_x86_64_gnullvm"
|
|
3276
3334
|
version = "0.48.5"
|
|
@@ -3283,6 +3341,12 @@ version = "0.52.5"
|
|
|
3283
3341
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3284
3342
|
checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
|
|
3285
3343
|
|
|
3344
|
+
[[package]]
|
|
3345
|
+
name = "windows_x86_64_gnullvm"
|
|
3346
|
+
version = "0.53.0"
|
|
3347
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3348
|
+
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
|
|
3349
|
+
|
|
3286
3350
|
[[package]]
|
|
3287
3351
|
name = "windows_x86_64_msvc"
|
|
3288
3352
|
version = "0.48.5"
|
|
@@ -3295,6 +3359,12 @@ version = "0.52.5"
|
|
|
3295
3359
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3296
3360
|
checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
|
|
3297
3361
|
|
|
3362
|
+
[[package]]
|
|
3363
|
+
name = "windows_x86_64_msvc"
|
|
3364
|
+
version = "0.53.0"
|
|
3365
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3366
|
+
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
|
|
3367
|
+
|
|
3298
3368
|
[[package]]
|
|
3299
3369
|
name = "winnow"
|
|
3300
3370
|
version = "0.5.40"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
authors = ["konstin <konstin@mailbox.org>", "messense <messense@icloud.com>"]
|
|
3
3
|
name = "maturin"
|
|
4
|
-
version = "1.9.
|
|
4
|
+
version = "1.9.6"
|
|
5
5
|
description = "Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages"
|
|
6
6
|
exclude = [
|
|
7
7
|
"test-crates/**/*",
|
|
@@ -105,11 +105,11 @@ cargo-xwin = { version = "0.18.6", default-features = false, optional = true }
|
|
|
105
105
|
|
|
106
106
|
# log
|
|
107
107
|
tracing = "0.1.36"
|
|
108
|
-
tracing-subscriber = { version = "0.3.
|
|
108
|
+
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
|
|
109
109
|
|
|
110
110
|
# project scaffolding, maturin new/init/generate-ci
|
|
111
111
|
dialoguer = { version = "0.11.0", default-features = false, optional = true }
|
|
112
|
-
console = { version = "0.
|
|
112
|
+
console = { version = "0.16.0", optional = true }
|
|
113
113
|
minijinja = { version = "2.5.0", optional = true }
|
|
114
114
|
|
|
115
115
|
# upload
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.9.6]
|
|
4
|
+
|
|
5
|
+
* Fix regressions to interpreter platform detection on Windows from 1.9.5
|
|
6
|
+
* Further fixes to interpreter detection for Windows ARM64
|
|
7
|
+
|
|
8
|
+
## [1.9.5]
|
|
9
|
+
|
|
10
|
+
* Add builtin sysconfig for FreeBSD 14.2 amd64
|
|
11
|
+
* Fix issue searching lib dir containing Python 3.14 `build-details.json`
|
|
12
|
+
* Fix detection of compatible interpreters on Windows ARM64
|
|
13
|
+
|
|
3
14
|
## [1.9.4]
|
|
4
15
|
|
|
5
16
|
* Add a `use-base-python` option to `pyproject.toml` with the same behaviour as `MATURIN_PEP517_USE_BASE_PYTHON`.
|
|
@@ -1098,7 +1109,9 @@ points-0.1.0-py2.py3-none-manylinux1_x86_64.whl | 2,8M | 752K | 85K
|
|
|
1098
1109
|
|
|
1099
1110
|
* Initial Release
|
|
1100
1111
|
|
|
1101
|
-
[Unreleased]: https://github.com/pyo3/maturin/compare/v1.9.
|
|
1112
|
+
[Unreleased]: https://github.com/pyo3/maturin/compare/v1.9.6...HEAD
|
|
1113
|
+
[1.9.6]: https://github.com/pyo3/maturin/compare/v1.9.5...v1.9.6
|
|
1114
|
+
[1.9.5]: https://github.com/pyo3/maturin/compare/v1.9.4...v1.9.5
|
|
1102
1115
|
[1.9.4]: https://github.com/pyo3/maturin/compare/v1.9.3...v1.9.4
|
|
1103
1116
|
[1.9.3]: https://github.com/pyo3/maturin/compare/v1.9.2...v1.9.3
|
|
1104
1117
|
[1.9.2]: https://github.com/pyo3/maturin/compare/v1.9.1...v1.9.2
|
|
@@ -374,8 +374,13 @@ impl BuildOptions {
|
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
} else {
|
|
377
|
-
interpreters =
|
|
378
|
-
|
|
377
|
+
interpreters = find_interpreter(
|
|
378
|
+
bridge,
|
|
379
|
+
interpreter,
|
|
380
|
+
target,
|
|
381
|
+
requires_python,
|
|
382
|
+
generate_import_lib,
|
|
383
|
+
)?;
|
|
379
384
|
}
|
|
380
385
|
|
|
381
386
|
let interpreters_str = interpreters
|
|
@@ -1288,6 +1293,7 @@ fn find_interpreter(
|
|
|
1288
1293
|
interpreter: &[PathBuf],
|
|
1289
1294
|
target: &Target,
|
|
1290
1295
|
requires_python: Option<&VersionSpecifiers>,
|
|
1296
|
+
generate_import_lib: bool,
|
|
1291
1297
|
) -> Result<Vec<PythonInterpreter>> {
|
|
1292
1298
|
let mut found_interpreters = Vec::new();
|
|
1293
1299
|
if !interpreter.is_empty() {
|
|
@@ -1301,6 +1307,16 @@ fn find_interpreter(
|
|
|
1301
1307
|
if !missing.is_empty() {
|
|
1302
1308
|
let sysconfig_interps =
|
|
1303
1309
|
find_interpreter_in_sysconfig(bridge, &missing, target, requires_python)?;
|
|
1310
|
+
|
|
1311
|
+
// Can only use sysconfig-derived interpreter on windows if generating the import lib
|
|
1312
|
+
if !sysconfig_interps.is_empty() && target.is_windows() && !generate_import_lib {
|
|
1313
|
+
let found = sysconfig_interps
|
|
1314
|
+
.iter()
|
|
1315
|
+
.map(|i| format!("{} {}.{}", i.interpreter_kind, i.major, i.minor))
|
|
1316
|
+
.collect::<Vec<_>>();
|
|
1317
|
+
bail!("Interpreters {found:?} were found in maturin's bundled sysconfig, but compiling for Windows without an interpreter requires PyO3's `generate-import-lib` feature");
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1304
1320
|
found_interpreters.extend(sysconfig_interps);
|
|
1305
1321
|
}
|
|
1306
1322
|
} else {
|
|
@@ -153,7 +153,9 @@ fn search_lib_dir(path: impl AsRef<Path>, target: &Target) -> Result<Vec<PathBuf
|
|
|
153
153
|
for f in fs::read_dir(path.as_ref())? {
|
|
154
154
|
let sysc = match &f {
|
|
155
155
|
Ok(f) if starts_with(f, "_sysconfigdata") && ends_with(f, "py") => vec![f.path()],
|
|
156
|
-
Ok(f) if starts_with(f, "build")
|
|
156
|
+
Ok(f) if starts_with(f, "build") && f.path().is_dir() => {
|
|
157
|
+
search_lib_dir(f.path(), target)?
|
|
158
|
+
}
|
|
157
159
|
Ok(f) if starts_with(f, "lib.") => {
|
|
158
160
|
let name = f.file_name();
|
|
159
161
|
// check if right target os
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
pub use self::config::InterpreterConfig;
|
|
2
2
|
use crate::auditwheel::PlatformTag;
|
|
3
|
+
use crate::target::Arch;
|
|
3
4
|
use crate::{BridgeModel, BuildContext, Target};
|
|
4
5
|
use anyhow::{bail, ensure, format_err, Context, Result};
|
|
5
6
|
use pep440_rs::{Version, VersionSpecifiers};
|
|
@@ -25,38 +26,6 @@ pub const MINIMUM_PYPY_MINOR: usize = 8;
|
|
|
25
26
|
pub const MAXIMUM_PYTHON_MINOR: usize = 13;
|
|
26
27
|
pub const MAXIMUM_PYPY_MINOR: usize = 11;
|
|
27
28
|
|
|
28
|
-
/// Identifies conditions where we do not want to build wheels
|
|
29
|
-
fn windows_interpreter_no_build(
|
|
30
|
-
major: usize,
|
|
31
|
-
minor: usize,
|
|
32
|
-
target_width: usize,
|
|
33
|
-
pointer_width: usize,
|
|
34
|
-
min_python_minor: usize,
|
|
35
|
-
requires_python: Option<&VersionSpecifiers>,
|
|
36
|
-
) -> bool {
|
|
37
|
-
// Only python 3 with supported major versions
|
|
38
|
-
if major != 3 || minor < min_python_minor {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// From requires-python in pyproject.toml
|
|
43
|
-
if let Some(requires_python) = requires_python {
|
|
44
|
-
if !requires_python.contains(&Version::new([major as u64, minor as u64])) {
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// There can be 32-bit installations on a 64-bit machine, but we can't link
|
|
50
|
-
// those for 64-bit targets
|
|
51
|
-
if pointer_width != target_width {
|
|
52
|
-
eprintln!(
|
|
53
|
-
"👽 {major}.{minor} is installed as {pointer_width}-bit, while the target is {target_width}-bit. Skipping."
|
|
54
|
-
);
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
false
|
|
58
|
-
}
|
|
59
|
-
|
|
60
29
|
/// On windows regular Python installs are supported along with environments
|
|
61
30
|
/// being managed by `conda`.
|
|
62
31
|
///
|
|
@@ -98,12 +67,32 @@ fn find_all_windows(
|
|
|
98
67
|
target: &Target,
|
|
99
68
|
bridge: &BridgeModel,
|
|
100
69
|
requires_python: Option<&VersionSpecifiers>,
|
|
101
|
-
) -> Result<Vec<
|
|
70
|
+
) -> Result<Vec<PythonInterpreter>> {
|
|
102
71
|
let min_python_minor = bridge.minimal_python_minor_version();
|
|
103
|
-
let code = "import sys; print(sys.executable or '')";
|
|
104
72
|
let mut interpreter = vec![];
|
|
105
73
|
let mut versions_found = HashSet::new();
|
|
106
74
|
|
|
75
|
+
macro_rules! maybe_add_interp {
|
|
76
|
+
($executable:expr) => {
|
|
77
|
+
PythonInterpreter::check_executable($executable, target, bridge).map(|interp| {
|
|
78
|
+
if let Some(interp) = interp {
|
|
79
|
+
let major = interp.major;
|
|
80
|
+
let minor = interp.minor;
|
|
81
|
+
if major == 3
|
|
82
|
+
&& minor >= min_python_minor
|
|
83
|
+
&& !versions_found.contains(&(major, minor))
|
|
84
|
+
&& requires_python.map_or(true, |requires_python| {
|
|
85
|
+
requires_python.contains(&Version::new([major as u64, minor as u64]))
|
|
86
|
+
})
|
|
87
|
+
{
|
|
88
|
+
interpreter.push(interp);
|
|
89
|
+
versions_found.insert((major, minor));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
107
96
|
// If Python is installed from Python.org it should include the "python launcher"
|
|
108
97
|
// which is used to find the installed interpreters
|
|
109
98
|
let execution = Command::new("cmd")
|
|
@@ -132,45 +121,13 @@ fn find_all_windows(
|
|
|
132
121
|
.parse::<usize>()
|
|
133
122
|
.context("Expected a digit for minor version")?;
|
|
134
123
|
if !versions_found.contains(&(major, minor)) {
|
|
135
|
-
let pointer_width = capture
|
|
136
|
-
.get(5)
|
|
137
|
-
.map(|m| m.as_str())
|
|
138
|
-
.filter(|m| !m.is_empty())
|
|
139
|
-
.unwrap_or("64")
|
|
140
|
-
.parse::<usize>()
|
|
141
|
-
.context("Expected a digit for pointer width")?;
|
|
142
|
-
|
|
143
|
-
if windows_interpreter_no_build(
|
|
144
|
-
major,
|
|
145
|
-
minor,
|
|
146
|
-
target.pointer_width(),
|
|
147
|
-
pointer_width,
|
|
148
|
-
min_python_minor,
|
|
149
|
-
requires_python,
|
|
150
|
-
) {
|
|
151
|
-
continue;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
124
|
let executable = capture.get(6).unwrap().as_str();
|
|
155
|
-
let
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
Err(err) => {
|
|
159
|
-
eprintln!(
|
|
160
|
-
"⚠️ Warning: failed to determine the path to python for `{executable}`: {err}"
|
|
161
|
-
);
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
let path = str::from_utf8(&output.stdout).unwrap().trim();
|
|
166
|
-
if !output.status.success() || path.trim().is_empty() {
|
|
167
|
-
eprintln!(
|
|
168
|
-
"⚠️ Warning: couldn't determine the path to python for `{executable}`"
|
|
169
|
-
);
|
|
125
|
+
let executable_path = Path::new(&executable);
|
|
126
|
+
// Skip non-existing paths
|
|
127
|
+
if !executable_path.exists() {
|
|
170
128
|
continue;
|
|
171
129
|
}
|
|
172
|
-
|
|
173
|
-
versions_found.insert((major, minor));
|
|
130
|
+
maybe_add_interp!(executable_path)?;
|
|
174
131
|
}
|
|
175
132
|
}
|
|
176
133
|
}
|
|
@@ -201,20 +158,7 @@ fn find_all_windows(
|
|
|
201
158
|
} else {
|
|
202
159
|
Path::new(&path).join("python")
|
|
203
160
|
};
|
|
204
|
-
|
|
205
|
-
if windows_interpreter_no_build(
|
|
206
|
-
python_info.major,
|
|
207
|
-
python_info.minor,
|
|
208
|
-
target.pointer_width(),
|
|
209
|
-
python_info.pointer_width.unwrap(),
|
|
210
|
-
min_python_minor,
|
|
211
|
-
requires_python,
|
|
212
|
-
) {
|
|
213
|
-
continue;
|
|
214
|
-
}
|
|
215
|
-
interpreter.push(String::from(executable.to_str().unwrap()));
|
|
216
|
-
versions_found.insert((python_info.major, python_info.minor));
|
|
217
|
-
}
|
|
161
|
+
maybe_add_interp!(executable.as_path())?;
|
|
218
162
|
}
|
|
219
163
|
}
|
|
220
164
|
|
|
@@ -222,20 +166,7 @@ fn find_all_windows(
|
|
|
222
166
|
for minor in min_python_minor..=bridge.maximum_python_minor_version() {
|
|
223
167
|
if !versions_found.contains(&(3, minor)) {
|
|
224
168
|
let executable = format!("python3.{minor}.exe");
|
|
225
|
-
|
|
226
|
-
if windows_interpreter_no_build(
|
|
227
|
-
python_info.major,
|
|
228
|
-
python_info.minor,
|
|
229
|
-
target.pointer_width(),
|
|
230
|
-
python_info.pointer_width.unwrap(),
|
|
231
|
-
min_python_minor,
|
|
232
|
-
requires_python,
|
|
233
|
-
) {
|
|
234
|
-
continue;
|
|
235
|
-
}
|
|
236
|
-
interpreter.push(executable);
|
|
237
|
-
versions_found.insert((3, minor));
|
|
238
|
-
}
|
|
169
|
+
maybe_add_interp!(Path::new(&executable))?;
|
|
239
170
|
}
|
|
240
171
|
}
|
|
241
172
|
|
|
@@ -247,53 +178,6 @@ fn find_all_windows(
|
|
|
247
178
|
Ok(interpreter)
|
|
248
179
|
}
|
|
249
180
|
|
|
250
|
-
struct WindowsPythonInfo {
|
|
251
|
-
major: usize,
|
|
252
|
-
minor: usize,
|
|
253
|
-
pointer_width: Option<usize>,
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
fn windows_python_info(executable: &Path) -> Result<Option<WindowsPythonInfo>> {
|
|
257
|
-
let python_info = Command::new(executable)
|
|
258
|
-
.arg("-c")
|
|
259
|
-
.arg("import sys; print(sys.version)")
|
|
260
|
-
.output();
|
|
261
|
-
|
|
262
|
-
let python_info = match python_info {
|
|
263
|
-
Ok(python_info) => python_info,
|
|
264
|
-
Err(err) => {
|
|
265
|
-
if err.kind() == io::ErrorKind::NotFound {
|
|
266
|
-
// python executable not found
|
|
267
|
-
return Ok(None);
|
|
268
|
-
} else {
|
|
269
|
-
bail!(
|
|
270
|
-
"Error getting Python version info from {}",
|
|
271
|
-
executable.display()
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
let version_info = str::from_utf8(&python_info.stdout).unwrap();
|
|
278
|
-
let expr = Regex::new(r"(\d).(\d).(\d+)").unwrap();
|
|
279
|
-
if let Some(capture) = expr.captures(version_info) {
|
|
280
|
-
let major = capture.get(1).unwrap().as_str().parse::<usize>().unwrap();
|
|
281
|
-
let minor = capture.get(2).unwrap().as_str().parse::<usize>().unwrap();
|
|
282
|
-
let pointer_width = if version_info.contains("64 bit (AMD64)") {
|
|
283
|
-
64
|
|
284
|
-
} else {
|
|
285
|
-
32
|
|
286
|
-
};
|
|
287
|
-
Ok(Some(WindowsPythonInfo {
|
|
288
|
-
major,
|
|
289
|
-
minor,
|
|
290
|
-
pointer_width: Some(pointer_width),
|
|
291
|
-
}))
|
|
292
|
-
} else {
|
|
293
|
-
Ok(None)
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
181
|
#[derive(Debug, Clone, Copy, Eq, PartialEq, Deserialize, clap::ValueEnum)]
|
|
298
182
|
#[serde(rename_all = "lowercase")]
|
|
299
183
|
#[clap(rename_all = "lower")]
|
|
@@ -631,9 +515,15 @@ impl PythonInterpreter {
|
|
|
631
515
|
let mut metadata_py = tempfile::NamedTempFile::new()?;
|
|
632
516
|
write!(metadata_py, "{GET_INTERPRETER_METADATA}")?;
|
|
633
517
|
let mut cmd = Command::new("cmd");
|
|
518
|
+
let suffix = match target.target_arch() {
|
|
519
|
+
Arch::X86 => "-32",
|
|
520
|
+
Arch::X86_64 => "-64",
|
|
521
|
+
Arch::Aarch64 => "-arm64",
|
|
522
|
+
_ => "",
|
|
523
|
+
};
|
|
634
524
|
cmd.arg("/c")
|
|
635
525
|
.arg("py")
|
|
636
|
-
.arg(format!("-{}
|
|
526
|
+
.arg(format!("-{ver}{suffix}"))
|
|
637
527
|
.arg(metadata_py.path())
|
|
638
528
|
.env("PYTHONNOUSERSITE", "1");
|
|
639
529
|
let output = cmd.output();
|
|
@@ -656,6 +546,18 @@ impl PythonInterpreter {
|
|
|
656
546
|
.context(err_msg)
|
|
657
547
|
.context(String::from_utf8_lossy(&output.stdout).trim().to_string())?;
|
|
658
548
|
|
|
549
|
+
Self::from_metadata_message(executable, target, bridge, message)
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/// Configure a `PythonInterpreter` from the metadata message.
|
|
553
|
+
///
|
|
554
|
+
/// Returns `None` if the interpreter is not suitable to use (e.g. too old or wrong architecture)
|
|
555
|
+
fn from_metadata_message(
|
|
556
|
+
executable: impl AsRef<Path>,
|
|
557
|
+
target: &Target,
|
|
558
|
+
bridge: &BridgeModel,
|
|
559
|
+
message: InterpreterMetadataMessage,
|
|
560
|
+
) -> Result<Option<PythonInterpreter>> {
|
|
659
561
|
if (message.major == 2 && message.minor != 7) || (message.major == 3 && message.minor < 5) {
|
|
660
562
|
debug!(
|
|
661
563
|
"Skipping outdated python interpreter '{}'",
|
|
@@ -678,6 +580,41 @@ impl PythonInterpreter {
|
|
|
678
580
|
executable.as_ref().display()
|
|
679
581
|
))?;
|
|
680
582
|
|
|
583
|
+
let executable = message
|
|
584
|
+
.executable
|
|
585
|
+
.map(PathBuf::from)
|
|
586
|
+
.unwrap_or_else(|| executable.as_ref().to_path_buf());
|
|
587
|
+
|
|
588
|
+
if target.is_windows() {
|
|
589
|
+
'windows_arch_check: {
|
|
590
|
+
// on windows we must check the architecture, because three different architectures
|
|
591
|
+
// can all run on the same hardware
|
|
592
|
+
let python_arch = match message.platform.as_str().trim() {
|
|
593
|
+
"win32" => Arch::X86,
|
|
594
|
+
"win-amd64" => Arch::X86_64,
|
|
595
|
+
"win-arm64" => Arch::Aarch64,
|
|
596
|
+
_ => {
|
|
597
|
+
eprintln!(
|
|
598
|
+
"⚠️ Warning: '{}' reports unknown platform. This may fail to build.",
|
|
599
|
+
executable.display()
|
|
600
|
+
);
|
|
601
|
+
break 'windows_arch_check;
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
if python_arch != target.target_arch() {
|
|
606
|
+
eprintln!(
|
|
607
|
+
"👽 '{}' reports a platform '{platform}' (architecture '{python_arch}'), while the Rust target is '{target_arch}'. Skipping.",
|
|
608
|
+
executable.display(),
|
|
609
|
+
platform = message.platform,
|
|
610
|
+
python_arch = python_arch,
|
|
611
|
+
target_arch = target.target_arch(),
|
|
612
|
+
);
|
|
613
|
+
return Ok(None);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
681
618
|
let platform = if message.platform.starts_with("macosx") {
|
|
682
619
|
// We don't use platform from sysconfig on macOS
|
|
683
620
|
None
|
|
@@ -685,10 +622,6 @@ impl PythonInterpreter {
|
|
|
685
622
|
Some(message.platform.to_lowercase().replace(['-', '.'], "_"))
|
|
686
623
|
};
|
|
687
624
|
|
|
688
|
-
let executable = message
|
|
689
|
-
.executable
|
|
690
|
-
.map(PathBuf::from)
|
|
691
|
-
.unwrap_or_else(|| executable.as_ref().to_path_buf());
|
|
692
625
|
debug!(
|
|
693
626
|
"Found {} interpreter at {}",
|
|
694
627
|
interpreter,
|
|
@@ -794,37 +727,38 @@ impl PythonInterpreter {
|
|
|
794
727
|
bridge: &BridgeModel,
|
|
795
728
|
requires_python: Option<&VersionSpecifiers>,
|
|
796
729
|
) -> Result<Vec<PythonInterpreter>> {
|
|
797
|
-
|
|
730
|
+
if target.is_windows() {
|
|
798
731
|
// TOFIX: add PyPy support to Windows
|
|
799
|
-
find_all_windows(target, bridge, requires_python)
|
|
800
|
-
} else {
|
|
801
|
-
let mut executables: Vec<String> = (bridge.minimal_python_minor_version()
|
|
802
|
-
..=bridge.maximum_python_minor_version())
|
|
803
|
-
.filter(|minor| {
|
|
804
|
-
requires_python
|
|
805
|
-
.map(|requires_python| {
|
|
806
|
-
requires_python.contains(&Version::new([3, *minor as u64]))
|
|
807
|
-
})
|
|
808
|
-
.unwrap_or(true)
|
|
809
|
-
})
|
|
810
|
-
.map(|minor| format!("python3.{minor}"))
|
|
811
|
-
.collect();
|
|
812
|
-
// Also try to find PyPy for cffi and pyo3 bindings
|
|
813
|
-
if *bridge == BridgeModel::Cffi || bridge.is_pyo3() {
|
|
814
|
-
executables.extend(
|
|
815
|
-
(bridge.minimal_pypy_minor_version()..=bridge.maximum_pypy_minor_version())
|
|
816
|
-
.filter(|minor| {
|
|
817
|
-
requires_python
|
|
818
|
-
.map(|requires_python| {
|
|
819
|
-
requires_python.contains(&Version::new([3, *minor as u64]))
|
|
820
|
-
})
|
|
821
|
-
.unwrap_or(true)
|
|
822
|
-
})
|
|
823
|
-
.map(|minor| format!("pypy3.{minor}")),
|
|
824
|
-
);
|
|
825
|
-
}
|
|
826
|
-
executables
|
|
732
|
+
return find_all_windows(target, bridge, requires_python);
|
|
827
733
|
};
|
|
734
|
+
|
|
735
|
+
let mut executables: Vec<String> = (bridge.minimal_python_minor_version()
|
|
736
|
+
..=bridge.maximum_python_minor_version())
|
|
737
|
+
.filter(|minor| {
|
|
738
|
+
requires_python
|
|
739
|
+
.map(|requires_python| {
|
|
740
|
+
requires_python.contains(&Version::new([3, *minor as u64]))
|
|
741
|
+
})
|
|
742
|
+
.unwrap_or(true)
|
|
743
|
+
})
|
|
744
|
+
.map(|minor| format!("python3.{minor}"))
|
|
745
|
+
.collect();
|
|
746
|
+
|
|
747
|
+
// Also try to find PyPy for cffi and pyo3 bindings
|
|
748
|
+
if *bridge == BridgeModel::Cffi || bridge.is_pyo3() {
|
|
749
|
+
executables.extend(
|
|
750
|
+
(bridge.minimal_pypy_minor_version()..=bridge.maximum_pypy_minor_version())
|
|
751
|
+
.filter(|minor| {
|
|
752
|
+
requires_python
|
|
753
|
+
.map(|requires_python| {
|
|
754
|
+
requires_python.contains(&Version::new([3, *minor as u64]))
|
|
755
|
+
})
|
|
756
|
+
.unwrap_or(true)
|
|
757
|
+
})
|
|
758
|
+
.map(|minor| format!("pypy3.{minor}")),
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
|
|
828
762
|
let mut available_versions = Vec::new();
|
|
829
763
|
for executable in executables {
|
|
830
764
|
if let Some(version) = PythonInterpreter::check_executable(executable, target, bridge)?
|
|
@@ -1180,4 +1114,142 @@ mod tests {
|
|
|
1180
1114
|
assert_eq!(calculate_abi_tag(ext_suffix).as_deref(), expected);
|
|
1181
1115
|
}
|
|
1182
1116
|
}
|
|
1117
|
+
|
|
1118
|
+
#[test]
|
|
1119
|
+
fn test_interpreter_from_metadata_windows() {
|
|
1120
|
+
// Test cases for different scenarios
|
|
1121
|
+
let target_x64 = Target::from_resolved_target_triple("x86_64-pc-windows-msvc").unwrap();
|
|
1122
|
+
let target_x86 = Target::from_resolved_target_triple("i686-pc-windows-msvc").unwrap();
|
|
1123
|
+
let target_arm64 = Target::from_resolved_target_triple("aarch64-pc-windows-msvc").unwrap();
|
|
1124
|
+
|
|
1125
|
+
let bridge = BridgeModel::PyO3(PyO3 {
|
|
1126
|
+
crate_name: PyO3Crate::PyO3,
|
|
1127
|
+
version: semver::Version::new(0, 26, 0),
|
|
1128
|
+
abi3: None,
|
|
1129
|
+
metadata: None,
|
|
1130
|
+
});
|
|
1131
|
+
|
|
1132
|
+
let message = |major, minor, platform: &str| InterpreterMetadataMessage {
|
|
1133
|
+
major,
|
|
1134
|
+
minor,
|
|
1135
|
+
interpreter: "cpython".to_string(),
|
|
1136
|
+
implementation_name: "CPython".to_string(),
|
|
1137
|
+
abiflags: None,
|
|
1138
|
+
ext_suffix: Some(".pyd".to_string()),
|
|
1139
|
+
platform: platform.to_string(),
|
|
1140
|
+
executable: None,
|
|
1141
|
+
soabi: None,
|
|
1142
|
+
gil_disabled: false,
|
|
1143
|
+
system: "windows".to_string(),
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
// Test Python 2.x should be rejected
|
|
1147
|
+
assert_eq!(
|
|
1148
|
+
PythonInterpreter::from_metadata_message(
|
|
1149
|
+
"python2.7",
|
|
1150
|
+
&target_x64,
|
|
1151
|
+
&bridge,
|
|
1152
|
+
message(2, 7, "win-amd64"),
|
|
1153
|
+
)
|
|
1154
|
+
.unwrap_err()
|
|
1155
|
+
.to_string(),
|
|
1156
|
+
"Failed to get information from the python interpreter at python2.7"
|
|
1157
|
+
);
|
|
1158
|
+
|
|
1159
|
+
// Test Python 3.x but below minimum version
|
|
1160
|
+
assert_eq!(
|
|
1161
|
+
PythonInterpreter::from_metadata_message(
|
|
1162
|
+
"python3.6",
|
|
1163
|
+
&target_x64,
|
|
1164
|
+
&bridge,
|
|
1165
|
+
message(3, 6, "win-amd64"),
|
|
1166
|
+
)
|
|
1167
|
+
.unwrap_err()
|
|
1168
|
+
.to_string(),
|
|
1169
|
+
"Failed to get information from the python interpreter at python3.6"
|
|
1170
|
+
);
|
|
1171
|
+
|
|
1172
|
+
// Test valid Python version with matching platform and architecture
|
|
1173
|
+
for (target, platform) in &[
|
|
1174
|
+
(&target_x86, "win32"),
|
|
1175
|
+
(&target_x64, "win-amd64"),
|
|
1176
|
+
(&target_arm64, "win-arm64"),
|
|
1177
|
+
] {
|
|
1178
|
+
assert_eq!(
|
|
1179
|
+
PythonInterpreter::from_metadata_message(
|
|
1180
|
+
"python3.10",
|
|
1181
|
+
target,
|
|
1182
|
+
&bridge,
|
|
1183
|
+
message(3, 10, platform),
|
|
1184
|
+
)
|
|
1185
|
+
.unwrap()
|
|
1186
|
+
.unwrap(),
|
|
1187
|
+
PythonInterpreter {
|
|
1188
|
+
config: InterpreterConfig {
|
|
1189
|
+
major: 3,
|
|
1190
|
+
minor: 10,
|
|
1191
|
+
interpreter_kind: InterpreterKind::CPython,
|
|
1192
|
+
abiflags: "".to_string(),
|
|
1193
|
+
ext_suffix: ".pyd".to_string(),
|
|
1194
|
+
pointer_width: None,
|
|
1195
|
+
gil_disabled: false,
|
|
1196
|
+
},
|
|
1197
|
+
executable: PathBuf::from("python3.10"),
|
|
1198
|
+
platform: Some(platform.replace("-", "_")),
|
|
1199
|
+
runnable: true,
|
|
1200
|
+
implementation_name: "CPython".to_string(),
|
|
1201
|
+
soabi: None,
|
|
1202
|
+
}
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
// Test mismatched architectures
|
|
1207
|
+
for (target, platform) in &[
|
|
1208
|
+
(&target_x86, "win-amd64"),
|
|
1209
|
+
(&target_x86, "win-arm64"),
|
|
1210
|
+
(&target_x64, "win32"),
|
|
1211
|
+
(&target_x64, "win-arm64"),
|
|
1212
|
+
(&target_arm64, "win32"),
|
|
1213
|
+
(&target_arm64, "win-amd64"),
|
|
1214
|
+
] {
|
|
1215
|
+
assert_eq!(
|
|
1216
|
+
PythonInterpreter::from_metadata_message(
|
|
1217
|
+
"python3.10",
|
|
1218
|
+
target,
|
|
1219
|
+
&bridge,
|
|
1220
|
+
message(3, 10, platform),
|
|
1221
|
+
)
|
|
1222
|
+
.unwrap(),
|
|
1223
|
+
None
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
// Test edge case with unknown platform (should not match any specific architecture, build anyway)
|
|
1228
|
+
assert_eq!(
|
|
1229
|
+
PythonInterpreter::from_metadata_message(
|
|
1230
|
+
"python3.10",
|
|
1231
|
+
&target_x64,
|
|
1232
|
+
&bridge,
|
|
1233
|
+
message(3, 10, "unknown-platform"),
|
|
1234
|
+
)
|
|
1235
|
+
.unwrap()
|
|
1236
|
+
.unwrap(),
|
|
1237
|
+
PythonInterpreter {
|
|
1238
|
+
config: InterpreterConfig {
|
|
1239
|
+
major: 3,
|
|
1240
|
+
minor: 10,
|
|
1241
|
+
interpreter_kind: InterpreterKind::CPython,
|
|
1242
|
+
abiflags: "".to_string(),
|
|
1243
|
+
ext_suffix: ".pyd".to_string(),
|
|
1244
|
+
pointer_width: None,
|
|
1245
|
+
gil_disabled: false,
|
|
1246
|
+
},
|
|
1247
|
+
executable: PathBuf::from("python3.10"),
|
|
1248
|
+
platform: Some("unknown_platform".to_string()),
|
|
1249
|
+
runnable: true,
|
|
1250
|
+
implementation_name: "CPython".to_string(),
|
|
1251
|
+
soabi: None,
|
|
1252
|
+
}
|
|
1253
|
+
);
|
|
1254
|
+
}
|
|
1183
1255
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|