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.

Files changed (64) hide show
  1. {maturin-1.9.2 → maturin-1.9.3}/.pre-commit-config.yaml +1 -1
  2. {maturin-1.9.2 → maturin-1.9.3}/Cargo.lock +1 -1
  3. {maturin-1.9.2 → maturin-1.9.3}/Cargo.toml +1 -1
  4. {maturin-1.9.2 → maturin-1.9.3}/Changelog.md +5 -0
  5. {maturin-1.9.2 → maturin-1.9.3}/PKG-INFO +1 -1
  6. {maturin-1.9.2 → maturin-1.9.3}/pyproject.toml +1 -1
  7. {maturin-1.9.2 → maturin-1.9.3}/src/source_distribution.rs +44 -12
  8. {maturin-1.9.2 → maturin-1.9.3}/src/target/legacy_py.rs +1 -1
  9. {maturin-1.9.2 → maturin-1.9.3}/src/target/pypi_tags.rs +9 -7
  10. {maturin-1.9.2 → maturin-1.9.3}/.cirrus.yml +0 -0
  11. {maturin-1.9.2 → maturin-1.9.3}/.codespellrc +0 -0
  12. {maturin-1.9.2 → maturin-1.9.3}/.config/nextest.toml +0 -0
  13. {maturin-1.9.2 → maturin-1.9.3}/.gitignore +0 -0
  14. {maturin-1.9.2 → maturin-1.9.3}/MANIFEST.in +0 -0
  15. {maturin-1.9.2 → maturin-1.9.3}/README.md +0 -0
  16. {maturin-1.9.2 → maturin-1.9.3}/clippy.toml +0 -0
  17. {maturin-1.9.2 → maturin-1.9.3}/license-apache +0 -0
  18. {maturin-1.9.2 → maturin-1.9.3}/license-mit +0 -0
  19. {maturin-1.9.2 → maturin-1.9.3}/maturin/__init__.py +0 -0
  20. {maturin-1.9.2 → maturin-1.9.3}/maturin/__main__.py +0 -0
  21. {maturin-1.9.2 → maturin-1.9.3}/maturin/bootstrap.py +0 -0
  22. {maturin-1.9.2 → maturin-1.9.3}/maturin.schema.json +0 -0
  23. {maturin-1.9.2 → maturin-1.9.3}/netlify.toml +0 -0
  24. {maturin-1.9.2 → maturin-1.9.3}/setup.py +0 -0
  25. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/audit.rs +0 -0
  26. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/manylinux-policy.json +0 -0
  27. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/mod.rs +0 -0
  28. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/musllinux-policy.json +0 -0
  29. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/musllinux.rs +0 -0
  30. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/patchelf.rs +0 -0
  31. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/platform_tag.rs +0 -0
  32. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/policy.rs +0 -0
  33. {maturin-1.9.2 → maturin-1.9.3}/src/auditwheel/repair.rs +0 -0
  34. {maturin-1.9.2 → maturin-1.9.3}/src/bridge.rs +0 -0
  35. {maturin-1.9.2 → maturin-1.9.3}/src/build_context.rs +0 -0
  36. {maturin-1.9.2 → maturin-1.9.3}/src/build_options.rs +0 -0
  37. {maturin-1.9.2 → maturin-1.9.3}/src/cargo_toml.rs +0 -0
  38. {maturin-1.9.2 → maturin-1.9.3}/src/ci.rs +0 -0
  39. {maturin-1.9.2 → maturin-1.9.3}/src/compile.rs +0 -0
  40. {maturin-1.9.2 → maturin-1.9.3}/src/compression.rs +0 -0
  41. {maturin-1.9.2 → maturin-1.9.3}/src/cross_compile.rs +0 -0
  42. {maturin-1.9.2 → maturin-1.9.3}/src/develop.rs +0 -0
  43. {maturin-1.9.2 → maturin-1.9.3}/src/generate_json_schema.rs +0 -0
  44. {maturin-1.9.2 → maturin-1.9.3}/src/lib.rs +0 -0
  45. {maturin-1.9.2 → maturin-1.9.3}/src/main.rs +0 -0
  46. {maturin-1.9.2 → maturin-1.9.3}/src/metadata.rs +0 -0
  47. {maturin-1.9.2 → maturin-1.9.3}/src/module_writer.rs +0 -0
  48. {maturin-1.9.2 → maturin-1.9.3}/src/new_project.rs +0 -0
  49. {maturin-1.9.2 → maturin-1.9.3}/src/project_layout.rs +0 -0
  50. {maturin-1.9.2 → maturin-1.9.3}/src/pyproject_toml.rs +0 -0
  51. {maturin-1.9.2 → maturin-1.9.3}/src/python_interpreter/config.rs +0 -0
  52. {maturin-1.9.2 → maturin-1.9.3}/src/python_interpreter/get_interpreter_metadata.py +0 -0
  53. {maturin-1.9.2 → maturin-1.9.3}/src/python_interpreter/mod.rs +0 -0
  54. {maturin-1.9.2 → maturin-1.9.3}/src/target/mod.rs +0 -0
  55. {maturin-1.9.2 → maturin-1.9.3}/src/templates/.gitignore.j2 +0 -0
  56. {maturin-1.9.2 → maturin-1.9.3}/src/templates/Cargo.toml.j2 +0 -0
  57. {maturin-1.9.2 → maturin-1.9.3}/src/templates/__init__.py.j2 +0 -0
  58. {maturin-1.9.2 → maturin-1.9.3}/src/templates/build.rs.j2 +0 -0
  59. {maturin-1.9.2 → maturin-1.9.3}/src/templates/example.udl.j2 +0 -0
  60. {maturin-1.9.2 → maturin-1.9.3}/src/templates/lib.rs.j2 +0 -0
  61. {maturin-1.9.2 → maturin-1.9.3}/src/templates/main.rs.j2 +0 -0
  62. {maturin-1.9.2 → maturin-1.9.3}/src/templates/pyproject.toml.j2 +0 -0
  63. {maturin-1.9.2 → maturin-1.9.3}/src/templates/test_all.py.j2 +0 -0
  64. {maturin-1.9.2 → maturin-1.9.3}/src/upload.rs +0 -0
@@ -56,7 +56,7 @@ repos:
56
56
  )
57
57
  - id: mixed-line-ending
58
58
  - repo: https://github.com/astral-sh/ruff-pre-commit
59
- rev: v0.12.4
59
+ rev: v0.12.5
60
60
  hooks:
61
61
  - id: ruff-format
62
62
  - id: ruff
@@ -1436,7 +1436,7 @@ dependencies = [
1436
1436
 
1437
1437
  [[package]]
1438
1438
  name = "maturin"
1439
- version = "1.9.2"
1439
+ version = "1.9.3"
1440
1440
  dependencies = [
1441
1441
  "anyhow",
1442
1442
  "base64 0.21.7",
@@ -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.2"
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`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maturin
3
- Version: 1.9.2
3
+ Version: 1.9.3
4
4
  Classifier: Topic :: Software Development :: Build Tools
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -1,7 +1,7 @@
1
1
  # Workaround to bootstrap maturin on non-manylinux platforms
2
2
  [build-system]
3
3
  requires = [
4
- "setuptools",
4
+ "setuptools>=77.0.0",
5
5
  "tomli>=1.1.0 ; python_version<'3.11'",
6
6
  "setuptools-rust>=1.11.0",
7
7
  ]
@@ -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 std::collections::HashMap;
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", false),
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", false), // Unsupported
226
- ("x86_64-unknown-freebsd", false), // Now unsupported (no lazy validation)
227
- ("powerpc64-unknown-linux-gnu", true), // PPC64 on Linux is supported
228
- ("s390x-unknown-linux-gnu", true), // s390x on Linux is supported
229
- ("wasm32-unknown-emscripten", false), // Emscripten is unsupported
230
- ("i686-pc-windows-msvc", true), // i686 Windows is supported
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