maturin 1.7.1__tar.gz → 1.7.3__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.7.1 → maturin-1.7.3}/.pre-commit-config.yaml +2 -2
- {maturin-1.7.1 → maturin-1.7.3}/Cargo.lock +79 -127
- {maturin-1.7.1 → maturin-1.7.3}/Cargo.toml +2 -2
- {maturin-1.7.1 → maturin-1.7.3}/Changelog.md +15 -1
- {maturin-1.7.1 → maturin-1.7.3}/PKG-INFO +3 -1
- {maturin-1.7.1 → maturin-1.7.3}/README.md +2 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/build_context.rs +2 -2
- {maturin-1.7.1 → maturin-1.7.3}/src/main.rs +6 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/module_writer.rs +23 -14
- {maturin-1.7.1 → maturin-1.7.3}/src/python_interpreter/config.rs +39 -33
- {maturin-1.7.1 → maturin-1.7.3}/src/target.rs +40 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/upload.rs +24 -10
- {maturin-1.7.1 → maturin-1.7.3}/.cirrus.yml +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/.codespellrc +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/.config/nextest.toml +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/.gitignore +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/MANIFEST.in +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/clippy.toml +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/license-apache +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/license-mit +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/maturin/__init__.py +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/maturin/__main__.py +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/maturin.schema.json +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/netlify.toml +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/pyproject.toml +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/setup.py +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/audit.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/manylinux-policy.json +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/mod.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/musllinux-policy.json +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/musllinux.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/patchelf.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/platform_tag.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/policy.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/auditwheel/repair.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/build_options.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/cargo_toml.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/ci.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/compile.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/cross_compile.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/develop.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/generate_json_schema.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/lib.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/metadata.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/new_project.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/project_layout.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/pyproject_toml.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/python_interpreter/get_interpreter_metadata.py +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/python_interpreter/mod.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/source_distribution.rs +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/.gitignore.j2 +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/Cargo.toml.j2 +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/__init__.py.j2 +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/build.rs.j2 +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/example.udl.j2 +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/lib.rs.j2 +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/main.rs.j2 +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/pyproject.toml.j2 +0 -0
- {maturin-1.7.1 → maturin-1.7.3}/src/templates/test_all.py.j2 +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.6.
|
|
59
|
+
rev: v0.6.7
|
|
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.11.
|
|
64
|
+
rev: v1.11.2
|
|
65
65
|
hooks:
|
|
66
66
|
- id: mypy
|
|
67
67
|
entry: mypy maturin/
|
|
@@ -90,15 +90,6 @@ version = "1.0.86"
|
|
|
90
90
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
91
91
|
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
|
92
92
|
|
|
93
|
-
[[package]]
|
|
94
|
-
name = "arbitrary"
|
|
95
|
-
version = "1.3.2"
|
|
96
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
97
|
-
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
|
|
98
|
-
dependencies = [
|
|
99
|
-
"derive_arbitrary",
|
|
100
|
-
]
|
|
101
|
-
|
|
102
93
|
[[package]]
|
|
103
94
|
name = "autocfg"
|
|
104
95
|
version = "1.3.0"
|
|
@@ -113,15 +104,9 @@ checksum = "edf3ee19dbc0a46d740f6f0926bde8c50f02bdbc7b536842da28f6ac56513a8b"
|
|
|
113
104
|
dependencies = [
|
|
114
105
|
"proc-macro2",
|
|
115
106
|
"quote",
|
|
116
|
-
"syn 2.0.
|
|
107
|
+
"syn 2.0.76",
|
|
117
108
|
]
|
|
118
109
|
|
|
119
|
-
[[package]]
|
|
120
|
-
name = "base64"
|
|
121
|
-
version = "0.13.1"
|
|
122
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
123
|
-
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
|
124
|
-
|
|
125
110
|
[[package]]
|
|
126
111
|
name = "base64"
|
|
127
112
|
version = "0.21.7"
|
|
@@ -157,9 +142,9 @@ dependencies = [
|
|
|
157
142
|
|
|
158
143
|
[[package]]
|
|
159
144
|
name = "bstr"
|
|
160
|
-
version = "1.
|
|
145
|
+
version = "1.10.0"
|
|
161
146
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
162
|
-
checksum = "
|
|
147
|
+
checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c"
|
|
163
148
|
dependencies = [
|
|
164
149
|
"memchr",
|
|
165
150
|
"serde",
|
|
@@ -173,9 +158,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|
|
173
158
|
|
|
174
159
|
[[package]]
|
|
175
160
|
name = "bytes"
|
|
176
|
-
version = "1.
|
|
161
|
+
version = "1.7.1"
|
|
177
162
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
178
|
-
checksum = "
|
|
163
|
+
checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
|
|
179
164
|
|
|
180
165
|
[[package]]
|
|
181
166
|
name = "bytesize"
|
|
@@ -218,9 +203,9 @@ dependencies = [
|
|
|
218
203
|
|
|
219
204
|
[[package]]
|
|
220
205
|
name = "camino"
|
|
221
|
-
version = "1.1.
|
|
206
|
+
version = "1.1.9"
|
|
222
207
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
223
|
-
checksum = "
|
|
208
|
+
checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
|
|
224
209
|
dependencies = [
|
|
225
210
|
"serde",
|
|
226
211
|
]
|
|
@@ -282,18 +267,21 @@ dependencies = [
|
|
|
282
267
|
|
|
283
268
|
[[package]]
|
|
284
269
|
name = "cargo-zigbuild"
|
|
285
|
-
version = "0.
|
|
270
|
+
version = "0.19.3"
|
|
286
271
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
287
|
-
checksum = "
|
|
272
|
+
checksum = "e700178b11124560cdbabc8808e938fe6d77abde036b77a4c03a191b02bac854"
|
|
288
273
|
dependencies = [
|
|
289
274
|
"anyhow",
|
|
275
|
+
"cargo-config2",
|
|
290
276
|
"cargo-options",
|
|
291
277
|
"cargo_metadata",
|
|
292
278
|
"clap",
|
|
279
|
+
"crc",
|
|
293
280
|
"dirs",
|
|
294
281
|
"fs-err",
|
|
295
282
|
"path-slash",
|
|
296
283
|
"rustc_version",
|
|
284
|
+
"rustflags",
|
|
297
285
|
"semver",
|
|
298
286
|
"serde",
|
|
299
287
|
"serde_json",
|
|
@@ -336,9 +324,12 @@ dependencies = [
|
|
|
336
324
|
|
|
337
325
|
[[package]]
|
|
338
326
|
name = "cc"
|
|
339
|
-
version = "1.1.
|
|
327
|
+
version = "1.1.21"
|
|
340
328
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
341
|
-
checksum = "
|
|
329
|
+
checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0"
|
|
330
|
+
dependencies = [
|
|
331
|
+
"shlex",
|
|
332
|
+
]
|
|
342
333
|
|
|
343
334
|
[[package]]
|
|
344
335
|
name = "cfb"
|
|
@@ -359,11 +350,11 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
|
359
350
|
|
|
360
351
|
[[package]]
|
|
361
352
|
name = "charset"
|
|
362
|
-
version = "0.1.
|
|
353
|
+
version = "0.1.5"
|
|
363
354
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
364
|
-
checksum = "
|
|
355
|
+
checksum = "f1f927b07c74ba84c7e5fe4db2baeb3e996ab2688992e39ac68ce3220a677c7e"
|
|
365
356
|
dependencies = [
|
|
366
|
-
"base64 0.
|
|
357
|
+
"base64 0.22.1",
|
|
367
358
|
"encoding_rs",
|
|
368
359
|
]
|
|
369
360
|
|
|
@@ -439,7 +430,7 @@ dependencies = [
|
|
|
439
430
|
"heck 0.5.0",
|
|
440
431
|
"proc-macro2",
|
|
441
432
|
"quote",
|
|
442
|
-
"syn 2.0.
|
|
433
|
+
"syn 2.0.76",
|
|
443
434
|
]
|
|
444
435
|
|
|
445
436
|
[[package]]
|
|
@@ -517,6 +508,21 @@ dependencies = [
|
|
|
517
508
|
"libc",
|
|
518
509
|
]
|
|
519
510
|
|
|
511
|
+
[[package]]
|
|
512
|
+
name = "crc"
|
|
513
|
+
version = "3.2.1"
|
|
514
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
515
|
+
checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
|
|
516
|
+
dependencies = [
|
|
517
|
+
"crc-catalog",
|
|
518
|
+
]
|
|
519
|
+
|
|
520
|
+
[[package]]
|
|
521
|
+
name = "crc-catalog"
|
|
522
|
+
version = "2.4.0"
|
|
523
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
524
|
+
checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
|
|
525
|
+
|
|
520
526
|
[[package]]
|
|
521
527
|
name = "crc32fast"
|
|
522
528
|
version = "1.4.2"
|
|
@@ -596,17 +602,6 @@ dependencies = [
|
|
|
596
602
|
"syn 1.0.109",
|
|
597
603
|
]
|
|
598
604
|
|
|
599
|
-
[[package]]
|
|
600
|
-
name = "derive_arbitrary"
|
|
601
|
-
version = "1.3.2"
|
|
602
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
603
|
-
checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
|
|
604
|
-
dependencies = [
|
|
605
|
-
"proc-macro2",
|
|
606
|
-
"quote",
|
|
607
|
-
"syn 2.0.66",
|
|
608
|
-
]
|
|
609
|
-
|
|
610
605
|
[[package]]
|
|
611
606
|
name = "dialoguer"
|
|
612
607
|
version = "0.11.0"
|
|
@@ -656,17 +651,6 @@ dependencies = [
|
|
|
656
651
|
"windows-sys 0.48.0",
|
|
657
652
|
]
|
|
658
653
|
|
|
659
|
-
[[package]]
|
|
660
|
-
name = "displaydoc"
|
|
661
|
-
version = "0.2.4"
|
|
662
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
663
|
-
checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
|
|
664
|
-
dependencies = [
|
|
665
|
-
"proc-macro2",
|
|
666
|
-
"quote",
|
|
667
|
-
"syn 2.0.66",
|
|
668
|
-
]
|
|
669
|
-
|
|
670
654
|
[[package]]
|
|
671
655
|
name = "dissimilar"
|
|
672
656
|
version = "1.0.9"
|
|
@@ -675,9 +659,9 @@ checksum = "59f8e79d1fbf76bdfbde321e902714bf6c49df88a7dda6fc682fc2979226962d"
|
|
|
675
659
|
|
|
676
660
|
[[package]]
|
|
677
661
|
name = "dunce"
|
|
678
|
-
version = "1.0.
|
|
662
|
+
version = "1.0.5"
|
|
679
663
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
680
|
-
checksum = "
|
|
664
|
+
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
|
|
681
665
|
|
|
682
666
|
[[package]]
|
|
683
667
|
name = "dyn-clone"
|
|
@@ -687,9 +671,9 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
|
|
|
687
671
|
|
|
688
672
|
[[package]]
|
|
689
673
|
name = "either"
|
|
690
|
-
version = "1.
|
|
674
|
+
version = "1.13.0"
|
|
691
675
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
692
|
-
checksum = "
|
|
676
|
+
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
|
693
677
|
|
|
694
678
|
[[package]]
|
|
695
679
|
name = "encode_unicode"
|
|
@@ -864,7 +848,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
|
|
864
848
|
dependencies = [
|
|
865
849
|
"proc-macro2",
|
|
866
850
|
"quote",
|
|
867
|
-
"syn 2.0.
|
|
851
|
+
"syn 2.0.76",
|
|
868
852
|
]
|
|
869
853
|
|
|
870
854
|
[[package]]
|
|
@@ -1045,9 +1029,9 @@ dependencies = [
|
|
|
1045
1029
|
|
|
1046
1030
|
[[package]]
|
|
1047
1031
|
name = "indexmap"
|
|
1048
|
-
version = "2.
|
|
1032
|
+
version = "2.4.0"
|
|
1049
1033
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1050
|
-
checksum = "
|
|
1034
|
+
checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c"
|
|
1051
1035
|
dependencies = [
|
|
1052
1036
|
"equivalent",
|
|
1053
1037
|
"hashbrown 0.14.5",
|
|
@@ -1132,9 +1116,9 @@ dependencies = [
|
|
|
1132
1116
|
|
|
1133
1117
|
[[package]]
|
|
1134
1118
|
name = "libc"
|
|
1135
|
-
version = "0.2.
|
|
1119
|
+
version = "0.2.158"
|
|
1136
1120
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1137
|
-
checksum = "
|
|
1121
|
+
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
|
|
1138
1122
|
|
|
1139
1123
|
[[package]]
|
|
1140
1124
|
name = "libmimalloc-sys"
|
|
@@ -1216,7 +1200,7 @@ dependencies = [
|
|
|
1216
1200
|
|
|
1217
1201
|
[[package]]
|
|
1218
1202
|
name = "maturin"
|
|
1219
|
-
version = "1.7.
|
|
1203
|
+
version = "1.7.3"
|
|
1220
1204
|
dependencies = [
|
|
1221
1205
|
"anyhow",
|
|
1222
1206
|
"base64 0.21.7",
|
|
@@ -1242,7 +1226,7 @@ dependencies = [
|
|
|
1242
1226
|
"glob",
|
|
1243
1227
|
"goblin",
|
|
1244
1228
|
"ignore",
|
|
1245
|
-
"indexmap 2.
|
|
1229
|
+
"indexmap 2.4.0",
|
|
1246
1230
|
"indoc",
|
|
1247
1231
|
"itertools",
|
|
1248
1232
|
"keyring",
|
|
@@ -1287,7 +1271,7 @@ dependencies = [
|
|
|
1287
1271
|
"url",
|
|
1288
1272
|
"which 6.0.1",
|
|
1289
1273
|
"wild",
|
|
1290
|
-
"zip
|
|
1274
|
+
"zip",
|
|
1291
1275
|
]
|
|
1292
1276
|
|
|
1293
1277
|
[[package]]
|
|
@@ -1428,27 +1412,6 @@ version = "0.1.0"
|
|
|
1428
1412
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1429
1413
|
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
|
1430
1414
|
|
|
1431
|
-
[[package]]
|
|
1432
|
-
name = "num_enum"
|
|
1433
|
-
version = "0.7.2"
|
|
1434
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1435
|
-
checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845"
|
|
1436
|
-
dependencies = [
|
|
1437
|
-
"num_enum_derive",
|
|
1438
|
-
]
|
|
1439
|
-
|
|
1440
|
-
[[package]]
|
|
1441
|
-
name = "num_enum_derive"
|
|
1442
|
-
version = "0.7.2"
|
|
1443
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1444
|
-
checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b"
|
|
1445
|
-
dependencies = [
|
|
1446
|
-
"proc-macro-crate",
|
|
1447
|
-
"proc-macro2",
|
|
1448
|
-
"quote",
|
|
1449
|
-
"syn 2.0.66",
|
|
1450
|
-
]
|
|
1451
|
-
|
|
1452
1415
|
[[package]]
|
|
1453
1416
|
name = "number_prefix"
|
|
1454
1417
|
version = "0.4.0"
|
|
@@ -1484,7 +1447,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
|
|
1484
1447
|
dependencies = [
|
|
1485
1448
|
"proc-macro2",
|
|
1486
1449
|
"quote",
|
|
1487
|
-
"syn 2.0.
|
|
1450
|
+
"syn 2.0.76",
|
|
1488
1451
|
]
|
|
1489
1452
|
|
|
1490
1453
|
[[package]]
|
|
@@ -1694,7 +1657,7 @@ version = "0.11.0"
|
|
|
1694
1657
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1695
1658
|
checksum = "ef7061023bcb58a0fc4a4bbe9819c13b0dca7c2abc14da14f5ecc1532ab3a36a"
|
|
1696
1659
|
dependencies = [
|
|
1697
|
-
"indexmap 2.
|
|
1660
|
+
"indexmap 2.4.0",
|
|
1698
1661
|
"pep440_rs",
|
|
1699
1662
|
"pep508_rs",
|
|
1700
1663
|
"serde",
|
|
@@ -1713,7 +1676,7 @@ dependencies = [
|
|
|
1713
1676
|
"rfc2047-decoder",
|
|
1714
1677
|
"tar",
|
|
1715
1678
|
"thiserror",
|
|
1716
|
-
"zip
|
|
1679
|
+
"zip",
|
|
1717
1680
|
]
|
|
1718
1681
|
|
|
1719
1682
|
[[package]]
|
|
@@ -1915,7 +1878,7 @@ dependencies = [
|
|
|
1915
1878
|
"regex",
|
|
1916
1879
|
"relative-path",
|
|
1917
1880
|
"rustc_version",
|
|
1918
|
-
"syn 2.0.
|
|
1881
|
+
"syn 2.0.76",
|
|
1919
1882
|
"unicode-ident",
|
|
1920
1883
|
]
|
|
1921
1884
|
|
|
@@ -1928,6 +1891,12 @@ dependencies = [
|
|
|
1928
1891
|
"semver",
|
|
1929
1892
|
]
|
|
1930
1893
|
|
|
1894
|
+
[[package]]
|
|
1895
|
+
name = "rustflags"
|
|
1896
|
+
version = "0.1.6"
|
|
1897
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1898
|
+
checksum = "d7fc92159fb50a431c5da366f7627751fe7263cf867f8a30f27fa6063ba02ac0"
|
|
1899
|
+
|
|
1931
1900
|
[[package]]
|
|
1932
1901
|
name = "rustix"
|
|
1933
1902
|
version = "0.38.34"
|
|
@@ -2033,7 +2002,7 @@ dependencies = [
|
|
|
2033
2002
|
"proc-macro2",
|
|
2034
2003
|
"quote",
|
|
2035
2004
|
"serde_derive_internals",
|
|
2036
|
-
"syn 2.0.
|
|
2005
|
+
"syn 2.0.76",
|
|
2037
2006
|
]
|
|
2038
2007
|
|
|
2039
2008
|
[[package]]
|
|
@@ -2059,7 +2028,7 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932"
|
|
|
2059
2028
|
dependencies = [
|
|
2060
2029
|
"proc-macro2",
|
|
2061
2030
|
"quote",
|
|
2062
|
-
"syn 2.0.
|
|
2031
|
+
"syn 2.0.76",
|
|
2063
2032
|
]
|
|
2064
2033
|
|
|
2065
2034
|
[[package]]
|
|
@@ -2096,22 +2065,22 @@ dependencies = [
|
|
|
2096
2065
|
|
|
2097
2066
|
[[package]]
|
|
2098
2067
|
name = "serde"
|
|
2099
|
-
version = "1.0.
|
|
2068
|
+
version = "1.0.210"
|
|
2100
2069
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2101
|
-
checksum = "
|
|
2070
|
+
checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
|
|
2102
2071
|
dependencies = [
|
|
2103
2072
|
"serde_derive",
|
|
2104
2073
|
]
|
|
2105
2074
|
|
|
2106
2075
|
[[package]]
|
|
2107
2076
|
name = "serde_derive"
|
|
2108
|
-
version = "1.0.
|
|
2077
|
+
version = "1.0.210"
|
|
2109
2078
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2110
|
-
checksum = "
|
|
2079
|
+
checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
|
|
2111
2080
|
dependencies = [
|
|
2112
2081
|
"proc-macro2",
|
|
2113
2082
|
"quote",
|
|
2114
|
-
"syn 2.0.
|
|
2083
|
+
"syn 2.0.76",
|
|
2115
2084
|
]
|
|
2116
2085
|
|
|
2117
2086
|
[[package]]
|
|
@@ -2122,16 +2091,17 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
|
|
|
2122
2091
|
dependencies = [
|
|
2123
2092
|
"proc-macro2",
|
|
2124
2093
|
"quote",
|
|
2125
|
-
"syn 2.0.
|
|
2094
|
+
"syn 2.0.76",
|
|
2126
2095
|
]
|
|
2127
2096
|
|
|
2128
2097
|
[[package]]
|
|
2129
2098
|
name = "serde_json"
|
|
2130
|
-
version = "1.0.
|
|
2099
|
+
version = "1.0.128"
|
|
2131
2100
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2132
|
-
checksum = "
|
|
2101
|
+
checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
|
|
2133
2102
|
dependencies = [
|
|
2134
2103
|
"itoa",
|
|
2104
|
+
"memchr",
|
|
2135
2105
|
"ryu",
|
|
2136
2106
|
"serde",
|
|
2137
2107
|
]
|
|
@@ -2296,9 +2266,9 @@ dependencies = [
|
|
|
2296
2266
|
|
|
2297
2267
|
[[package]]
|
|
2298
2268
|
name = "syn"
|
|
2299
|
-
version = "2.0.
|
|
2269
|
+
version = "2.0.76"
|
|
2300
2270
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2301
|
-
checksum = "
|
|
2271
|
+
checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
|
|
2302
2272
|
dependencies = [
|
|
2303
2273
|
"proc-macro2",
|
|
2304
2274
|
"quote",
|
|
@@ -2318,9 +2288,9 @@ dependencies = [
|
|
|
2318
2288
|
|
|
2319
2289
|
[[package]]
|
|
2320
2290
|
name = "target-lexicon"
|
|
2321
|
-
version = "0.12.
|
|
2291
|
+
version = "0.12.16"
|
|
2322
2292
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2323
|
-
checksum = "
|
|
2293
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
2324
2294
|
|
|
2325
2295
|
[[package]]
|
|
2326
2296
|
name = "tempfile"
|
|
@@ -2381,7 +2351,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
|
|
|
2381
2351
|
dependencies = [
|
|
2382
2352
|
"proc-macro2",
|
|
2383
2353
|
"quote",
|
|
2384
|
-
"syn 2.0.
|
|
2354
|
+
"syn 2.0.76",
|
|
2385
2355
|
]
|
|
2386
2356
|
|
|
2387
2357
|
[[package]]
|
|
@@ -2475,7 +2445,7 @@ version = "0.21.1"
|
|
|
2475
2445
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2476
2446
|
checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
|
|
2477
2447
|
dependencies = [
|
|
2478
|
-
"indexmap 2.
|
|
2448
|
+
"indexmap 2.4.0",
|
|
2479
2449
|
"toml_datetime",
|
|
2480
2450
|
"winnow 0.5.40",
|
|
2481
2451
|
]
|
|
@@ -2486,7 +2456,7 @@ version = "0.22.14"
|
|
|
2486
2456
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2487
2457
|
checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38"
|
|
2488
2458
|
dependencies = [
|
|
2489
|
-
"indexmap 2.
|
|
2459
|
+
"indexmap 2.4.0",
|
|
2490
2460
|
"serde",
|
|
2491
2461
|
"serde_spanned",
|
|
2492
2462
|
"toml_datetime",
|
|
@@ -2512,7 +2482,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
|
|
2512
2482
|
dependencies = [
|
|
2513
2483
|
"proc-macro2",
|
|
2514
2484
|
"quote",
|
|
2515
|
-
"syn 2.0.
|
|
2485
|
+
"syn 2.0.76",
|
|
2516
2486
|
]
|
|
2517
2487
|
|
|
2518
2488
|
[[package]]
|
|
@@ -3045,7 +3015,7 @@ dependencies = [
|
|
|
3045
3015
|
"ureq",
|
|
3046
3016
|
"versions",
|
|
3047
3017
|
"walkdir",
|
|
3048
|
-
"zip
|
|
3018
|
+
"zip",
|
|
3049
3019
|
]
|
|
3050
3020
|
|
|
3051
3021
|
[[package]]
|
|
@@ -3071,7 +3041,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
|
|
|
3071
3041
|
dependencies = [
|
|
3072
3042
|
"proc-macro2",
|
|
3073
3043
|
"quote",
|
|
3074
|
-
"syn 2.0.
|
|
3044
|
+
"syn 2.0.76",
|
|
3075
3045
|
]
|
|
3076
3046
|
|
|
3077
3047
|
[[package]]
|
|
@@ -3093,21 +3063,3 @@ dependencies = [
|
|
|
3093
3063
|
"flate2",
|
|
3094
3064
|
"time",
|
|
3095
3065
|
]
|
|
3096
|
-
|
|
3097
|
-
[[package]]
|
|
3098
|
-
name = "zip"
|
|
3099
|
-
version = "1.1.4"
|
|
3100
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3101
|
-
checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164"
|
|
3102
|
-
dependencies = [
|
|
3103
|
-
"arbitrary",
|
|
3104
|
-
"bzip2",
|
|
3105
|
-
"crc32fast",
|
|
3106
|
-
"crossbeam-utils",
|
|
3107
|
-
"displaydoc",
|
|
3108
|
-
"flate2",
|
|
3109
|
-
"indexmap 2.2.6",
|
|
3110
|
-
"num_enum",
|
|
3111
|
-
"thiserror",
|
|
3112
|
-
"time",
|
|
3113
|
-
]
|
|
@@ -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.7.
|
|
4
|
+
version = "1.7.3"
|
|
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/**/*",
|
|
@@ -97,7 +97,7 @@ clap = { version = "4.0.0", features = [
|
|
|
97
97
|
clap_complete_command = { version = "0.6.1", optional = true }
|
|
98
98
|
|
|
99
99
|
# cross compile
|
|
100
|
-
cargo-zigbuild = { version = "0.
|
|
100
|
+
cargo-zigbuild = { version = "0.19.3", default-features = false, optional = true }
|
|
101
101
|
cargo-xwin = { version = "0.16.5", default-features = false, optional = true }
|
|
102
102
|
|
|
103
103
|
# log
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.7.3]
|
|
4
|
+
|
|
5
|
+
* Fix upload regression to pypi/testpypi in [#2229](https://github.com/PyO3/maturin/pull/2229)
|
|
6
|
+
|
|
7
|
+
## [1.7.2]
|
|
8
|
+
|
|
9
|
+
* Fix cross compilation issues for armv7l, mips64 and ppc in [#2204](https://github.com/PyO3/maturin/pull/2204)
|
|
10
|
+
* UniFFI: supports bindings generated from multiple crates in [#2208](https://github.com/PyO3/maturin/pull/2208)
|
|
11
|
+
* Enable `--all-features` when building source distribution in [#2215](https://github.com/PyO3/maturin/pull/2215)
|
|
12
|
+
* Fix rpath when module-name contains `.` in [#2219](https://github.com/PyO3/maturin/pull/2219)
|
|
13
|
+
|
|
3
14
|
## [1.7.1]
|
|
4
15
|
|
|
5
16
|
* Forward `cargo package --list` warnings in [#2186](https://github.com/PyO3/maturin/pull/2186)
|
|
@@ -976,7 +987,10 @@ points-0.1.0-py2.py3-none-manylinux1_x86_64.whl | 2,8M | 752K | 85K
|
|
|
976
987
|
|
|
977
988
|
* Initial Release
|
|
978
989
|
|
|
979
|
-
[Unreleased]: https://github.com/pyo3/maturin/compare/v1.7.
|
|
990
|
+
[Unreleased]: https://github.com/pyo3/maturin/compare/v1.7.3...HEAD
|
|
991
|
+
[1.7.3]: https://github.com/pyo3/maturin/compare/v1.7.2...v1.7.3
|
|
992
|
+
[1.7.2]: https://github.com/pyo3/maturin/compare/v1.7.1...v1.7.2
|
|
993
|
+
[1.7.1]: https://github.com/pyo3/maturin/compare/v1.7.0...v1.7.1
|
|
980
994
|
[1.7.0]: https://github.com/pyo3/maturin/compare/v1.6.0...v1.7.0
|
|
981
995
|
[1.6.0]: https://github.com/pyo3/maturin/compare/v1.5.1...v1.6.0
|
|
982
996
|
[1.5.1]: https://github.com/pyo3/maturin/compare/v1.5.0...v1.5.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: maturin
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.3
|
|
4
4
|
Classifier: Topic :: Software Development :: Build Tools
|
|
5
5
|
Classifier: Programming Language :: Rust
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
@@ -66,6 +66,8 @@ There are examples for the different bindings in the `test-crates` folder.
|
|
|
66
66
|
The name of the package will be the name of the cargo project, i.e. the name field in the `[package]` section of `Cargo.toml`.
|
|
67
67
|
The name of the module, which you are using when importing, will be the `name` value in the `[lib]` section (which defaults to the name of the package). For binaries, it's simply the name of the binary generated by cargo.
|
|
68
68
|
|
|
69
|
+
When using `maturin build` and `maturin develop` commands, you can compile a performance-optimized program by adding the `-r` or `--release` flag.
|
|
70
|
+
|
|
69
71
|
## Python packaging basics
|
|
70
72
|
|
|
71
73
|
Python packages come in two formats:
|
|
@@ -41,6 +41,8 @@ There are examples for the different bindings in the `test-crates` folder.
|
|
|
41
41
|
The name of the package will be the name of the cargo project, i.e. the name field in the `[package]` section of `Cargo.toml`.
|
|
42
42
|
The name of the module, which you are using when importing, will be the `name` value in the `[lib]` section (which defaults to the name of the package). For binaries, it's simply the name of the binary generated by cargo.
|
|
43
43
|
|
|
44
|
+
When using `maturin build` and `maturin develop` commands, you can compile a performance-optimized program by adding the `-r` or `--release` flag.
|
|
45
|
+
|
|
44
46
|
## Python packaging basics
|
|
45
47
|
|
|
46
48
|
Python packages come in two formats:
|
|
@@ -480,12 +480,12 @@ impl BuildContext {
|
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
// Currently artifact .so file always resides at ${module_name}/${module_name}.so
|
|
483
|
-
let artifact_dir =
|
|
483
|
+
let artifact_dir = self.module_name.split(".").collect::<PathBuf>();
|
|
484
484
|
for artifact in artifacts {
|
|
485
485
|
let mut new_rpaths = patchelf::get_rpath(&artifact.path)?;
|
|
486
486
|
// TODO: clean existing rpath entries if it's not pointed to a location within the wheel
|
|
487
487
|
// See https://github.com/pypa/auditwheel/blob/353c24250d66951d5ac7e60b97471a6da76c123f/src/auditwheel/repair.py#L160
|
|
488
|
-
let new_rpath = Path::new("$ORIGIN").join(relpath(&libs_dir, artifact_dir));
|
|
488
|
+
let new_rpath = Path::new("$ORIGIN").join(relpath(&libs_dir, &artifact_dir));
|
|
489
489
|
new_rpaths.push(new_rpath.to_str().unwrap().to_string());
|
|
490
490
|
let new_rpath = new_rpaths.join(":");
|
|
491
491
|
patchelf::set_rpath(&artifact.path, &new_rpath)?;
|
|
@@ -311,6 +311,9 @@ fn pep517(subcommand: Pep517Command) -> Result<()> {
|
|
|
311
311
|
out: Some(sdist_directory),
|
|
312
312
|
cargo: CargoOptions {
|
|
313
313
|
manifest_path,
|
|
314
|
+
// Enable all features to ensure all optional path dependencies are packaged
|
|
315
|
+
// into source distribution
|
|
316
|
+
all_features: true,
|
|
314
317
|
..Default::default()
|
|
315
318
|
},
|
|
316
319
|
..Default::default()
|
|
@@ -417,6 +420,9 @@ fn run() -> Result<()> {
|
|
|
417
420
|
out,
|
|
418
421
|
cargo: CargoOptions {
|
|
419
422
|
manifest_path,
|
|
423
|
+
// Enable all features to ensure all optional path dependencies are packaged
|
|
424
|
+
// into source distribution
|
|
425
|
+
all_features: true,
|
|
420
426
|
..Default::default()
|
|
421
427
|
},
|
|
422
428
|
..Default::default()
|
|
@@ -984,7 +984,14 @@ fn uniffi_bindgen_command(crate_dir: &Path) -> Result<Command> {
|
|
|
984
984
|
.no_deps()
|
|
985
985
|
.verbose(true)
|
|
986
986
|
.exec()?;
|
|
987
|
-
let root_pkg = cargo_metadata.root_package()
|
|
987
|
+
let root_pkg = match cargo_metadata.root_package() {
|
|
988
|
+
Some(pkg) => Some(pkg),
|
|
989
|
+
None => cargo_metadata
|
|
990
|
+
.packages
|
|
991
|
+
.iter()
|
|
992
|
+
.find(|p| p.manifest_path == manifest_path),
|
|
993
|
+
};
|
|
994
|
+
|
|
988
995
|
let has_uniffi_bindgen_target = root_pkg
|
|
989
996
|
.map(|pkg| {
|
|
990
997
|
pkg.targets
|
|
@@ -1093,7 +1100,6 @@ fn generate_uniffi_bindings(
|
|
|
1093
1100
|
bail!("Command {:?} failed", cmd);
|
|
1094
1101
|
}
|
|
1095
1102
|
|
|
1096
|
-
let py_binding = binding_dir.join(&py_binding_name).with_extension("py");
|
|
1097
1103
|
// uniffi bindings hardcoded the extension filenames
|
|
1098
1104
|
let cdylib_name = match cdylib_name {
|
|
1099
1105
|
Some(name) => name,
|
|
@@ -1108,7 +1114,7 @@ fn generate_uniffi_bindings(
|
|
|
1108
1114
|
Ok(UniFfiBindings {
|
|
1109
1115
|
name: py_binding_name,
|
|
1110
1116
|
cdylib,
|
|
1111
|
-
path:
|
|
1117
|
+
path: binding_dir,
|
|
1112
1118
|
})
|
|
1113
1119
|
}
|
|
1114
1120
|
|
|
@@ -1128,7 +1134,7 @@ pub fn write_uniffi_module(
|
|
|
1128
1134
|
let UniFfiBindings {
|
|
1129
1135
|
name: binding_name,
|
|
1130
1136
|
cdylib,
|
|
1131
|
-
path:
|
|
1137
|
+
path: binding_dir,
|
|
1132
1138
|
} = generate_uniffi_bindings(crate_dir, target_dir, target_os, artifact)?;
|
|
1133
1139
|
let py_init = format!("from .{binding_name} import * # NOQA\n");
|
|
1134
1140
|
|
|
@@ -1150,12 +1156,14 @@ pub fn write_uniffi_module(
|
|
|
1150
1156
|
))?;
|
|
1151
1157
|
|
|
1152
1158
|
File::create(base_path.join("__init__.py"))?.write_all(py_init.as_bytes())?;
|
|
1153
|
-
let
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
+
if let Ok(read_dir) = fs::read_dir(&binding_dir) {
|
|
1160
|
+
for binding_file in read_dir.flatten() {
|
|
1161
|
+
let target: PathBuf = base_path.join(binding_file.file_name());
|
|
1162
|
+
fs::copy(binding_file.path(), &target).with_context(|| {
|
|
1163
|
+
format!("Failed to copy {:?} to {:?}", binding_file.path(), target)
|
|
1164
|
+
})?;
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1159
1167
|
}
|
|
1160
1168
|
|
|
1161
1169
|
let relative = project_layout
|
|
@@ -1181,10 +1189,11 @@ pub fn write_uniffi_module(
|
|
|
1181
1189
|
|
|
1182
1190
|
if !editable || project_layout.python_module.is_none() {
|
|
1183
1191
|
writer.add_bytes(module.join("__init__.py"), None, py_init.as_bytes())?;
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1192
|
+
if let Ok(read_dir) = fs::read_dir(binding_dir) {
|
|
1193
|
+
for binding_file in read_dir.flatten() {
|
|
1194
|
+
writer.add_file(module.join(binding_file.file_name()), binding_file.path())?;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1188
1197
|
writer.add_file_with_permissions(module.join(cdylib), artifact, 0o755)?;
|
|
1189
1198
|
}
|
|
1190
1199
|
|
|
@@ -47,26 +47,8 @@ impl InterpreterConfig {
|
|
|
47
47
|
// Python 2 is not supported
|
|
48
48
|
return None;
|
|
49
49
|
}
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
} else if matches!(target.target_arch(), Arch::Powerpc64Le) && python_impl == PyPy {
|
|
53
|
-
"ppc_64"
|
|
54
|
-
} else if matches!(target.target_arch(), Arch::X86) && python_impl == PyPy {
|
|
55
|
-
"x86"
|
|
56
|
-
} else {
|
|
57
|
-
target.get_python_arch()
|
|
58
|
-
};
|
|
59
|
-
// See https://github.com/pypa/auditwheel/issues/349
|
|
60
|
-
let target_env = match python_impl {
|
|
61
|
-
CPython => {
|
|
62
|
-
if python_version >= (3, 11) {
|
|
63
|
-
target.target_env().to_string()
|
|
64
|
-
} else {
|
|
65
|
-
target.target_env().to_string().replace("musl", "gnu")
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
PyPy | GraalPy => "gnu".to_string(),
|
|
69
|
-
};
|
|
50
|
+
let python_ext_arch = target.get_python_ext_arch(python_impl);
|
|
51
|
+
let target_env = target.get_python_target_env(python_impl, python_version);
|
|
70
52
|
match (target.target_os(), python_impl) {
|
|
71
53
|
(Os::Linux, CPython) => {
|
|
72
54
|
let abiflags = if python_version < (3, 8) {
|
|
@@ -77,7 +59,7 @@ impl InterpreterConfig {
|
|
|
77
59
|
let ldversion = format!("{}{}{}", major, minor, abiflags);
|
|
78
60
|
let ext_suffix = format!(
|
|
79
61
|
".cpython-{}-{}-linux-{}.so",
|
|
80
|
-
ldversion,
|
|
62
|
+
ldversion, python_ext_arch, target_env
|
|
81
63
|
);
|
|
82
64
|
Some(Self {
|
|
83
65
|
major,
|
|
@@ -90,7 +72,8 @@ impl InterpreterConfig {
|
|
|
90
72
|
}
|
|
91
73
|
(Os::Linux, PyPy) => {
|
|
92
74
|
let abi_tag = format!("pypy{}{}-{}", major, minor, PYPY_ABI_TAG);
|
|
93
|
-
let ext_suffix =
|
|
75
|
+
let ext_suffix =
|
|
76
|
+
format!(".{}-{}-linux-{}.so", abi_tag, python_ext_arch, target_env);
|
|
94
77
|
Some(Self {
|
|
95
78
|
major,
|
|
96
79
|
minor,
|
|
@@ -204,7 +187,8 @@ impl InterpreterConfig {
|
|
|
204
187
|
}
|
|
205
188
|
(Os::Emscripten, CPython) => {
|
|
206
189
|
let ldversion = format!("{}{}", major, minor);
|
|
207
|
-
let ext_suffix =
|
|
190
|
+
let ext_suffix =
|
|
191
|
+
format!(".cpython-{}-{}-emscripten.so", ldversion, python_ext_arch);
|
|
208
192
|
Some(Self {
|
|
209
193
|
major,
|
|
210
194
|
minor,
|
|
@@ -300,19 +284,14 @@ impl InterpreterConfig {
|
|
|
300
284
|
};
|
|
301
285
|
let file_ext = if target.is_windows() { "pyd" } else { "so" };
|
|
302
286
|
let ext_suffix = if target.is_linux() || target.is_macos() {
|
|
303
|
-
|
|
304
|
-
let target_env = if (major, minor) >= (3, 11) {
|
|
305
|
-
target.target_env().to_string()
|
|
306
|
-
} else {
|
|
307
|
-
target.target_env().to_string().replace("musl", "gnu")
|
|
308
|
-
};
|
|
287
|
+
let target_env = target.get_python_target_env(interpreter_kind, (major, minor));
|
|
309
288
|
match interpreter_kind {
|
|
310
289
|
InterpreterKind::CPython => ext_suffix.unwrap_or_else(|| {
|
|
311
290
|
// Eg: .cpython-38-x86_64-linux-gnu.so
|
|
312
291
|
format!(
|
|
313
292
|
".cpython-{}-{}-{}-{}.{}",
|
|
314
293
|
abi_tag,
|
|
315
|
-
target.
|
|
294
|
+
target.get_python_ext_arch(interpreter_kind),
|
|
316
295
|
target.get_python_os(),
|
|
317
296
|
target_env,
|
|
318
297
|
file_ext,
|
|
@@ -325,7 +304,7 @@ impl InterpreterConfig {
|
|
|
325
304
|
major,
|
|
326
305
|
minor,
|
|
327
306
|
abi_tag,
|
|
328
|
-
target.
|
|
307
|
+
target.get_python_ext_arch(interpreter_kind),
|
|
329
308
|
target.get_python_os(),
|
|
330
309
|
target_env,
|
|
331
310
|
file_ext,
|
|
@@ -336,7 +315,7 @@ impl InterpreterConfig {
|
|
|
336
315
|
format!(
|
|
337
316
|
".{}-{}-{}.{}",
|
|
338
317
|
abi_tag.replace('_', "-"),
|
|
339
|
-
target.
|
|
318
|
+
target.get_python_ext_arch(interpreter_kind),
|
|
340
319
|
target.get_python_os(),
|
|
341
320
|
file_ext,
|
|
342
321
|
)
|
|
@@ -347,7 +326,7 @@ impl InterpreterConfig {
|
|
|
347
326
|
format!(
|
|
348
327
|
".cpython-{}-{}-{}.{}",
|
|
349
328
|
abi_tag,
|
|
350
|
-
target.
|
|
329
|
+
target.get_python_ext_arch(interpreter_kind),
|
|
351
330
|
target.get_python_os(),
|
|
352
331
|
file_ext
|
|
353
332
|
)
|
|
@@ -445,6 +424,33 @@ mod test {
|
|
|
445
424
|
".cpython-310-powerpc64le-linux-gnu.so"
|
|
446
425
|
);
|
|
447
426
|
|
|
427
|
+
let sysconfig = InterpreterConfig::lookup_one(
|
|
428
|
+
&Target::from_target_triple(Some("powerpc-unknown-linux-gnu".to_string())).unwrap(),
|
|
429
|
+
InterpreterKind::CPython,
|
|
430
|
+
(3, 10),
|
|
431
|
+
)
|
|
432
|
+
.unwrap();
|
|
433
|
+
assert_eq!(sysconfig.ext_suffix, ".cpython-310-powerpc-linux-gnu.so");
|
|
434
|
+
|
|
435
|
+
let sysconfig = InterpreterConfig::lookup_one(
|
|
436
|
+
&Target::from_target_triple(Some("mips64-unknown-linux-gnu".to_string())).unwrap(),
|
|
437
|
+
InterpreterKind::CPython,
|
|
438
|
+
(3, 10),
|
|
439
|
+
)
|
|
440
|
+
.unwrap();
|
|
441
|
+
assert_eq!(
|
|
442
|
+
sysconfig.ext_suffix,
|
|
443
|
+
".cpython-310-mips64-linux-gnuabi64.so"
|
|
444
|
+
);
|
|
445
|
+
|
|
446
|
+
let sysconfig = InterpreterConfig::lookup_one(
|
|
447
|
+
&Target::from_target_triple(Some("mips-unknown-linux-gnu".to_string())).unwrap(),
|
|
448
|
+
InterpreterKind::CPython,
|
|
449
|
+
(3, 10),
|
|
450
|
+
)
|
|
451
|
+
.unwrap();
|
|
452
|
+
assert_eq!(sysconfig.ext_suffix, ".cpython-310-mips-linux-gnu.so");
|
|
453
|
+
|
|
448
454
|
let sysconfig = InterpreterConfig::lookup_one(
|
|
449
455
|
&Target::from_target_triple(Some("s390x-unknown-linux-gnu".to_string())).unwrap(),
|
|
450
456
|
InterpreterKind::CPython,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
use crate::cross_compile::is_cross_compiling;
|
|
2
|
+
use crate::python_interpreter::InterpreterKind;
|
|
3
|
+
use crate::python_interpreter::InterpreterKind::{CPython, GraalPy, PyPy};
|
|
2
4
|
use crate::PlatformTag;
|
|
3
5
|
use anyhow::{anyhow, bail, format_err, Result};
|
|
4
6
|
use platform_info::*;
|
|
@@ -368,6 +370,44 @@ impl Target {
|
|
|
368
370
|
}
|
|
369
371
|
}
|
|
370
372
|
|
|
373
|
+
/// Returns the extension architecture name python uses in `ext_suffix` for this architecture.
|
|
374
|
+
pub fn get_python_ext_arch(&self, python_impl: InterpreterKind) -> &str {
|
|
375
|
+
if matches!(self.target_arch(), Arch::Armv6L | Arch::Armv7L) {
|
|
376
|
+
"arm"
|
|
377
|
+
} else if matches!(self.target_arch(), Arch::Powerpc64Le)
|
|
378
|
+
&& python_impl == InterpreterKind::PyPy
|
|
379
|
+
{
|
|
380
|
+
"ppc_64"
|
|
381
|
+
} else if matches!(self.target_arch(), Arch::X86) && python_impl == InterpreterKind::PyPy {
|
|
382
|
+
"x86"
|
|
383
|
+
} else if matches!(self.target_arch(), Arch::Powerpc) {
|
|
384
|
+
"powerpc"
|
|
385
|
+
} else {
|
|
386
|
+
self.get_python_arch()
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/// Returns the environment python uses in `ext_suffix` for this architecture.
|
|
391
|
+
pub fn get_python_target_env(
|
|
392
|
+
&self,
|
|
393
|
+
python_impl: InterpreterKind,
|
|
394
|
+
python_version: (usize, usize),
|
|
395
|
+
) -> String {
|
|
396
|
+
match python_impl {
|
|
397
|
+
CPython => {
|
|
398
|
+
// For musl handling see https://github.com/pypa/auditwheel/issues/349
|
|
399
|
+
if matches!(self.target_arch(), Arch::Mips64 | Arch::Mips64el) && self.is_linux() {
|
|
400
|
+
"gnuabi64".to_string()
|
|
401
|
+
} else if python_version >= (3, 11) {
|
|
402
|
+
self.target_env().to_string()
|
|
403
|
+
} else {
|
|
404
|
+
self.target_env().to_string().replace("musl", "gnu")
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
PyPy | GraalPy => "gnu".to_string(),
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
371
411
|
/// Returns the name python uses in `sys.platform` for this os
|
|
372
412
|
pub fn get_python_os(&self) -> &str {
|
|
373
413
|
match self.os {
|
|
@@ -59,8 +59,9 @@ pub struct PublishOpt {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
impl PublishOpt {
|
|
62
|
-
|
|
63
|
-
const
|
|
62
|
+
// Here we omit trailing slashes from the repository URL, which we'll add back in `complete_registry`
|
|
63
|
+
const DEFAULT_REPOSITORY_URL: &'static str = "https://upload.pypi.org/legacy";
|
|
64
|
+
const TEST_REPOSITORY_URL: &'static str = "https://test.pypi.org/legacy";
|
|
64
65
|
|
|
65
66
|
/// Set to non interactive mode if we're running on CI
|
|
66
67
|
pub fn non_interactive_on_ci(&mut self) {
|
|
@@ -316,20 +317,33 @@ fn complete_registry(opt: &PublishOpt) -> Result<Registry> {
|
|
|
316
317
|
let pypirc = load_pypirc();
|
|
317
318
|
let (registry_name, registry_url) = if let Some(repository_url) = opt.repository_url.as_deref()
|
|
318
319
|
{
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
PublishOpt::
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
320
|
+
// to normalize URLs by removing trailing slashes
|
|
321
|
+
match repository_url.trim_end_matches('/') {
|
|
322
|
+
PublishOpt::DEFAULT_REPOSITORY_URL => (
|
|
323
|
+
Some("pypi"),
|
|
324
|
+
// Add trailing slash back
|
|
325
|
+
format!("{}/", PublishOpt::DEFAULT_REPOSITORY_URL),
|
|
326
|
+
),
|
|
327
|
+
PublishOpt::TEST_REPOSITORY_URL => (
|
|
328
|
+
Some("testpypi"),
|
|
329
|
+
// Add trailing slash back
|
|
330
|
+
format!("{}/", PublishOpt::TEST_REPOSITORY_URL),
|
|
331
|
+
),
|
|
332
|
+
_ => (None, repository_url.to_string()),
|
|
333
|
+
}
|
|
325
334
|
} else if let Some(url) = pypirc.get(&opt.repository, "repository") {
|
|
326
335
|
(Some(opt.repository.as_str()), url)
|
|
327
336
|
} else if opt.repository == "pypi" {
|
|
328
|
-
(
|
|
337
|
+
(
|
|
338
|
+
Some("pypi"),
|
|
339
|
+
// Add trailing slash back
|
|
340
|
+
format!("{}/", PublishOpt::DEFAULT_REPOSITORY_URL),
|
|
341
|
+
)
|
|
329
342
|
} else if opt.repository == "testpypi" {
|
|
330
343
|
(
|
|
331
344
|
Some("testpypi"),
|
|
332
|
-
|
|
345
|
+
// Add trailing slash back
|
|
346
|
+
format!("{}/", PublishOpt::TEST_REPOSITORY_URL),
|
|
333
347
|
)
|
|
334
348
|
} else {
|
|
335
349
|
bail!(
|
|
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
|