maturin 1.9.2__tar.gz → 1.9.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.9.2 → maturin-1.9.3}/.pre-commit-config.yaml +1 -1
- {maturin-1.9.2 → maturin-1.9.3}/Cargo.lock +1 -1
- {maturin-1.9.2 → maturin-1.9.3}/Cargo.toml +1 -1
- {maturin-1.9.2 → maturin-1.9.3}/Changelog.md +5 -0
- {maturin-1.9.2 → maturin-1.9.3}/PKG-INFO +1 -1
- {maturin-1.9.2 → maturin-1.9.3}/pyproject.toml +1 -1
- {maturin-1.9.2 → maturin-1.9.3}/src/source_distribution.rs +44 -12
- {maturin-1.9.2 → maturin-1.9.3}/src/target/legacy_py.rs +1 -1
- {maturin-1.9.2 → maturin-1.9.3}/src/target/pypi_tags.rs +9 -7
- {maturin-1.9.2 → maturin-1.9.3}/.cirrus.yml +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/.codespellrc +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/.config/nextest.toml +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/.gitignore +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/MANIFEST.in +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/README.md +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/clippy.toml +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/license-apache +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/license-mit +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/maturin/__init__.py +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/maturin/__main__.py +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/maturin/bootstrap.py +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/maturin.schema.json +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/netlify.toml +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/setup.py +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/audit.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/manylinux-policy.json +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/mod.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/musllinux-policy.json +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/musllinux.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/patchelf.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/platform_tag.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/policy.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/repair.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/bridge.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/build_context.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/build_options.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/cargo_toml.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/ci.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/compile.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/compression.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/cross_compile.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/develop.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/generate_json_schema.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/lib.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/main.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/metadata.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/module_writer.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/new_project.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/project_layout.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/pyproject_toml.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/python_interpreter/config.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/python_interpreter/get_interpreter_metadata.py +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/python_interpreter/mod.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/target/mod.rs +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/.gitignore.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/Cargo.toml.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/__init__.py.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/build.rs.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/example.udl.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/lib.rs.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/main.rs.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/pyproject.toml.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/templates/test_all.py.j2 +0 -0
- {maturin-1.9.2 → maturin-1.9.3}/src/upload.rs +0 -0
|
@@ -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.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/**/*",
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## [1.9.3]
|
|
6
|
+
|
|
7
|
+
* Fix adding `project.license-files` to source distributions.
|
|
8
|
+
* Fix relative Readme rewrite of the root crate in source distributions.
|
|
9
|
+
|
|
5
10
|
## [1.9.2]
|
|
6
11
|
|
|
7
12
|
* Fix PEP 639 implementation, use `License-Expression` over `License`.
|
|
@@ -8,7 +8,8 @@ use fs_err as fs;
|
|
|
8
8
|
use ignore::overrides::Override;
|
|
9
9
|
use normpath::PathExt as _;
|
|
10
10
|
use path_slash::PathExt as _;
|
|
11
|
-
use
|
|
11
|
+
use pyproject_toml::check_pep639_glob;
|
|
12
|
+
use std::collections::{HashMap, HashSet};
|
|
12
13
|
use std::ffi::OsStr;
|
|
13
14
|
use std::io::Write;
|
|
14
15
|
use std::path::{Path, PathBuf};
|
|
@@ -501,17 +502,8 @@ fn add_cargo_package_files_to_sdist(
|
|
|
501
502
|
.unwrap()
|
|
502
503
|
.strip_prefix(&sdist_root)
|
|
503
504
|
.unwrap();
|
|
504
|
-
add_crate_to_source_distribution(
|
|
505
|
-
writer,
|
|
506
|
-
manifest_path,
|
|
507
|
-
root_dir.join(relative_main_crate_manifest_dir),
|
|
508
|
-
None,
|
|
509
|
-
&known_path_deps,
|
|
510
|
-
true,
|
|
511
|
-
false,
|
|
512
|
-
)?;
|
|
513
505
|
// Handle possible relative readme field in Cargo.toml
|
|
514
|
-
if let Some(readme) = main_crate.readme.as_ref() {
|
|
506
|
+
let readme_path = if let Some(readme) = main_crate.readme.as_ref() {
|
|
515
507
|
let readme = abs_manifest_dir.join(readme);
|
|
516
508
|
let abs_readme = readme
|
|
517
509
|
.normalize()
|
|
@@ -530,7 +522,19 @@ fn add_cargo_package_files_to_sdist(
|
|
|
530
522
|
.join(readme.file_name().unwrap()),
|
|
531
523
|
&abs_readme,
|
|
532
524
|
)?;
|
|
533
|
-
|
|
525
|
+
Some(abs_readme)
|
|
526
|
+
} else {
|
|
527
|
+
None
|
|
528
|
+
};
|
|
529
|
+
add_crate_to_source_distribution(
|
|
530
|
+
writer,
|
|
531
|
+
manifest_path,
|
|
532
|
+
root_dir.join(relative_main_crate_manifest_dir),
|
|
533
|
+
readme_path.as_deref(),
|
|
534
|
+
&known_path_deps,
|
|
535
|
+
true,
|
|
536
|
+
false,
|
|
537
|
+
)?;
|
|
534
538
|
|
|
535
539
|
// Add Cargo.lock file and workspace Cargo.toml
|
|
536
540
|
let manifest_cargo_lock_path = abs_manifest_dir.join("Cargo.lock");
|
|
@@ -785,6 +789,34 @@ pub fn source_distribution(
|
|
|
785
789
|
if let Some(pyproject_toml::License::File { file }) = project.license.as_ref() {
|
|
786
790
|
writer.add_file(root_dir.join(file), pyproject_dir.join(file))?;
|
|
787
791
|
}
|
|
792
|
+
if let Some(license_files) = &project.license_files {
|
|
793
|
+
// Safe on Windows and Unix as neither forward nor backwards slashes are escaped.
|
|
794
|
+
let escaped_pyproject_dir =
|
|
795
|
+
PathBuf::from(glob::Pattern::escape(pyproject_dir.to_str().unwrap()));
|
|
796
|
+
let mut seen = HashSet::new();
|
|
797
|
+
for license_glob in license_files {
|
|
798
|
+
check_pep639_glob(license_glob)?;
|
|
799
|
+
for license_path in
|
|
800
|
+
glob::glob(&escaped_pyproject_dir.join(license_glob).to_string_lossy())?
|
|
801
|
+
{
|
|
802
|
+
let license_path = license_path?;
|
|
803
|
+
if !license_path.is_file() {
|
|
804
|
+
continue;
|
|
805
|
+
}
|
|
806
|
+
let license_path = license_path
|
|
807
|
+
.strip_prefix(pyproject_dir)
|
|
808
|
+
.expect("matched path starts with glob root")
|
|
809
|
+
.to_path_buf();
|
|
810
|
+
if seen.insert(license_path.clone()) {
|
|
811
|
+
debug!("Including license file `{}`", license_path.display());
|
|
812
|
+
writer.add_file(
|
|
813
|
+
root_dir.join(&license_path),
|
|
814
|
+
pyproject_dir.join(&license_path),
|
|
815
|
+
)?;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
788
820
|
}
|
|
789
821
|
|
|
790
822
|
let mut include = |pattern| -> Result<()> {
|
|
@@ -57,7 +57,7 @@ pub(super) static IOS_ARCHES: &[&str] = &["arm64", "x86_64"];
|
|
|
57
57
|
pub(super) static ANDROID_ARCHES: &[&str] = &["armeabi_v7a", "arm64_v8a", "x86", "x86_64"];
|
|
58
58
|
|
|
59
59
|
pub(super) static MANYLINUX_ARCHES: &[&str] = &[
|
|
60
|
-
"x86_64", "i686", "aarch64", "armv7l", "ppc64le", "s390x", "ppc64",
|
|
60
|
+
"x86_64", "i686", "aarch64", "armv7l", "ppc64le", "s390x", "ppc64", "riscv64",
|
|
61
61
|
];
|
|
62
62
|
|
|
63
63
|
pub(super) static MUSLLINUX_ARCHES: &[&str] =
|
|
@@ -78,6 +78,7 @@ pub fn is_arch_supported_by_pypi(target: &Target) -> bool {
|
|
|
78
78
|
/// Validates that a wheel platform tag is allowed by PyPI.
|
|
79
79
|
///
|
|
80
80
|
/// Based on PyPI warehouse platform tag validation logic.
|
|
81
|
+
///
|
|
81
82
|
fn is_platform_tag_allowed_by_pypi(platform_tag: &str) -> bool {
|
|
82
83
|
// Covers old Windows and old manylinux tags.
|
|
83
84
|
if ALLOWED_PLATFORMS.contains(&platform_tag) {
|
|
@@ -170,7 +171,8 @@ mod tests {
|
|
|
170
171
|
// manylinux platforms
|
|
171
172
|
("manylinux2014_x86_64", true),
|
|
172
173
|
("manylinux_2_17_aarch64", true),
|
|
173
|
-
("manylinux_2_17_riscv64",
|
|
174
|
+
("manylinux_2_17_riscv64", true),
|
|
175
|
+
("manylinux_2_39_riscv64", true),
|
|
174
176
|
// musllinux platforms
|
|
175
177
|
("musllinux_1_1_x86_64", true),
|
|
176
178
|
("musllinux_1_1_riscv64", false),
|
|
@@ -222,12 +224,12 @@ mod tests {
|
|
|
222
224
|
("x86_64-unknown-linux-gnu", true),
|
|
223
225
|
("aarch64-linux-android", true),
|
|
224
226
|
("armv7-linux-androideabi", true),
|
|
225
|
-
("riscv64gc-unknown-linux-gnu",
|
|
226
|
-
("x86_64-unknown-freebsd", false),
|
|
227
|
-
("powerpc64-unknown-linux-gnu", true),
|
|
228
|
-
("s390x-unknown-linux-gnu", true),
|
|
229
|
-
("wasm32-unknown-emscripten", false),
|
|
230
|
-
("i686-pc-windows-msvc", true),
|
|
227
|
+
("riscv64gc-unknown-linux-gnu", true),
|
|
228
|
+
("x86_64-unknown-freebsd", false), // Now unsupported (no lazy validation)
|
|
229
|
+
("powerpc64-unknown-linux-gnu", true), // PPC64 on Linux is supported
|
|
230
|
+
("s390x-unknown-linux-gnu", true), // s390x on Linux is supported
|
|
231
|
+
("wasm32-unknown-emscripten", false), // Emscripten is unsupported
|
|
232
|
+
("i686-pc-windows-msvc", true), // i686 Windows is supported
|
|
231
233
|
];
|
|
232
234
|
|
|
233
235
|
for (triple, expected) in targets {
|
|
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
|