maturin 1.9.1__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.1 → maturin-1.9.3}/.pre-commit-config.yaml +2 -2
  2. {maturin-1.9.1 → maturin-1.9.3}/Cargo.lock +2 -1
  3. {maturin-1.9.1 → maturin-1.9.3}/Cargo.toml +2 -1
  4. {maturin-1.9.1 → maturin-1.9.3}/Changelog.md +9 -0
  5. {maturin-1.9.1 → maturin-1.9.3}/PKG-INFO +4 -4
  6. {maturin-1.9.1 → maturin-1.9.3}/pyproject.toml +6 -2
  7. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/audit.rs +110 -1
  8. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/manylinux-policy.json +72 -13
  9. {maturin-1.9.1 → maturin-1.9.3}/src/build_context.rs +8 -1
  10. {maturin-1.9.1 → maturin-1.9.3}/src/develop.rs +2 -2
  11. {maturin-1.9.1 → maturin-1.9.3}/src/lib.rs +1 -0
  12. {maturin-1.9.1 → maturin-1.9.3}/src/main.rs +21 -5
  13. {maturin-1.9.1 → maturin-1.9.3}/src/metadata.rs +208 -3
  14. {maturin-1.9.1 → maturin-1.9.3}/src/new_project.rs +3 -6
  15. {maturin-1.9.1 → maturin-1.9.3}/src/pyproject_toml.rs +1 -4
  16. {maturin-1.9.1 → maturin-1.9.3}/src/source_distribution.rs +48 -17
  17. {maturin-1.9.1 → maturin-1.9.3}/src/target/legacy_py.rs +1 -1
  18. {maturin-1.9.1 → maturin-1.9.3}/src/target/pypi_tags.rs +9 -7
  19. {maturin-1.9.1 → maturin-1.9.3}/src/upload.rs +1 -1
  20. {maturin-1.9.1 → maturin-1.9.3}/.cirrus.yml +0 -0
  21. {maturin-1.9.1 → maturin-1.9.3}/.codespellrc +0 -0
  22. {maturin-1.9.1 → maturin-1.9.3}/.config/nextest.toml +0 -0
  23. {maturin-1.9.1 → maturin-1.9.3}/.gitignore +0 -0
  24. {maturin-1.9.1 → maturin-1.9.3}/MANIFEST.in +0 -0
  25. {maturin-1.9.1 → maturin-1.9.3}/README.md +0 -0
  26. {maturin-1.9.1 → maturin-1.9.3}/clippy.toml +0 -0
  27. {maturin-1.9.1 → maturin-1.9.3}/license-apache +0 -0
  28. {maturin-1.9.1 → maturin-1.9.3}/license-mit +0 -0
  29. {maturin-1.9.1 → maturin-1.9.3}/maturin/__init__.py +0 -0
  30. {maturin-1.9.1 → maturin-1.9.3}/maturin/__main__.py +0 -0
  31. {maturin-1.9.1 → maturin-1.9.3}/maturin/bootstrap.py +0 -0
  32. {maturin-1.9.1 → maturin-1.9.3}/maturin.schema.json +0 -0
  33. {maturin-1.9.1 → maturin-1.9.3}/netlify.toml +0 -0
  34. {maturin-1.9.1 → maturin-1.9.3}/setup.py +0 -0
  35. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/mod.rs +0 -0
  36. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/musllinux-policy.json +0 -0
  37. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/musllinux.rs +0 -0
  38. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/patchelf.rs +0 -0
  39. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/platform_tag.rs +0 -0
  40. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/policy.rs +0 -0
  41. {maturin-1.9.1 → maturin-1.9.3}/src/auditwheel/repair.rs +0 -0
  42. {maturin-1.9.1 → maturin-1.9.3}/src/bridge.rs +0 -0
  43. {maturin-1.9.1 → maturin-1.9.3}/src/build_options.rs +0 -0
  44. {maturin-1.9.1 → maturin-1.9.3}/src/cargo_toml.rs +0 -0
  45. {maturin-1.9.1 → maturin-1.9.3}/src/ci.rs +0 -0
  46. {maturin-1.9.1 → maturin-1.9.3}/src/compile.rs +0 -0
  47. {maturin-1.9.1 → maturin-1.9.3}/src/compression.rs +0 -0
  48. {maturin-1.9.1 → maturin-1.9.3}/src/cross_compile.rs +0 -0
  49. {maturin-1.9.1 → maturin-1.9.3}/src/generate_json_schema.rs +0 -0
  50. {maturin-1.9.1 → maturin-1.9.3}/src/module_writer.rs +0 -0
  51. {maturin-1.9.1 → maturin-1.9.3}/src/project_layout.rs +0 -0
  52. {maturin-1.9.1 → maturin-1.9.3}/src/python_interpreter/config.rs +0 -0
  53. {maturin-1.9.1 → maturin-1.9.3}/src/python_interpreter/get_interpreter_metadata.py +0 -0
  54. {maturin-1.9.1 → maturin-1.9.3}/src/python_interpreter/mod.rs +0 -0
  55. {maturin-1.9.1 → maturin-1.9.3}/src/target/mod.rs +0 -0
  56. {maturin-1.9.1 → maturin-1.9.3}/src/templates/.gitignore.j2 +0 -0
  57. {maturin-1.9.1 → maturin-1.9.3}/src/templates/Cargo.toml.j2 +0 -0
  58. {maturin-1.9.1 → maturin-1.9.3}/src/templates/__init__.py.j2 +0 -0
  59. {maturin-1.9.1 → maturin-1.9.3}/src/templates/build.rs.j2 +0 -0
  60. {maturin-1.9.1 → maturin-1.9.3}/src/templates/example.udl.j2 +0 -0
  61. {maturin-1.9.1 → maturin-1.9.3}/src/templates/lib.rs.j2 +0 -0
  62. {maturin-1.9.1 → maturin-1.9.3}/src/templates/main.rs.j2 +0 -0
  63. {maturin-1.9.1 → maturin-1.9.3}/src/templates/pyproject.toml.j2 +0 -0
  64. {maturin-1.9.1 → maturin-1.9.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.12.2
59
+ rev: v0.12.5
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.16.1
64
+ rev: v1.17.0
65
65
  hooks:
66
66
  - id: mypy
67
67
  entry: mypy maturin/
@@ -1436,7 +1436,7 @@ dependencies = [
1436
1436
 
1437
1437
  [[package]]
1438
1438
  name = "maturin"
1439
- version = "1.9.1"
1439
+ version = "1.9.3"
1440
1440
  dependencies = [
1441
1441
  "anyhow",
1442
1442
  "base64 0.21.7",
@@ -1484,6 +1484,7 @@ dependencies = [
1484
1484
  "regex",
1485
1485
  "rstest",
1486
1486
  "rustc_version",
1487
+ "rustflags",
1487
1488
  "rustls",
1488
1489
  "rustls-pemfile",
1489
1490
  "rustversion",
@@ -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.1"
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/**/*",
@@ -50,6 +50,7 @@ flate2 = "1.0.18"
50
50
  goblin = "0.9.0"
51
51
  platform-info = "2.0.2"
52
52
  regex = "1.7.0"
53
+ rustflags = "0.1.6"
53
54
  serde = { version = "1.0.197", features = ["derive"] }
54
55
  serde_json = "1.0.114"
55
56
  sha2 = "0.10.3"
@@ -2,6 +2,15 @@
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
+
10
+ ## [1.9.2]
11
+
12
+ * Fix PEP 639 implementation, use `License-Expression` over `License`.
13
+
5
14
  ## [1.9.1]
6
15
 
7
16
  * Fix absolute license file path from `Cargo.toml` in [#2667](https://github.com/PyO3/maturin/pull/2667)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maturin
3
- Version: 1.9.1
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
@@ -10,12 +10,12 @@ Requires-Dist: ziglang>=0.10.0,<0.13.0 ; extra == 'zig'
10
10
  Requires-Dist: patchelf ; extra == 'patchelf'
11
11
  Provides-Extra: zig
12
12
  Provides-Extra: patchelf
13
+ License-File: license-mit
14
+ License-File: license-apache
13
15
  Summary: Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
14
- Keywords: python,cffi,packaging,pypi,pyo3
15
16
  Home-Page: https://github.com/pyo3/maturin
16
- Author: konstin <konstin@mailbox.org>, messense <messense@icloud.com>
17
17
  Author-email: konstin <konstin@mailbox.org>
18
- License: MIT OR Apache-2.0
18
+ License-Expression: MIT OR Apache-2.0
19
19
  Requires-Python: >=3.7
20
20
  Description-Content-Type: text/markdown
21
21
  Project-URL: Source Code, https://github.com/PyO3/maturin
@@ -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
  ]
@@ -14,7 +14,11 @@ description = "Build and publish crates with pyo3, cffi and uniffi bindings as w
14
14
  authors = [{ name = "konstin", email = "konstin@mailbox.org" }]
15
15
  readme = { file = "README.md", content-type = "text/markdown" }
16
16
  requires-python = ">=3.7"
17
- license = { text = "MIT OR Apache-2.0" }
17
+ license = "MIT OR Apache-2.0"
18
+ license-files = [
19
+ "license-mit",
20
+ "license-apache",
21
+ ]
18
22
  classifiers = [
19
23
  "Topic :: Software Development :: Build Tools",
20
24
  "Programming Language :: Rust",
@@ -473,6 +473,7 @@ pub fn get_policy_and_libs(
473
473
  artifact: &BuildArtifact,
474
474
  platform_tag: Option<PlatformTag>,
475
475
  target: &Target,
476
+ manifest_path: &Path,
476
477
  allow_linking_libpython: bool,
477
478
  ) -> Result<(Policy, Vec<Library>)> {
478
479
  let (policy, should_repair) =
@@ -487,7 +488,13 @@ pub fn get_policy_and_libs(
487
488
  )?;
488
489
  let external_libs = if should_repair {
489
490
  let sysroot = get_sysroot_path(target).unwrap_or_else(|_| PathBuf::from("/"));
490
- let ld_paths = artifact.linked_paths.iter().map(PathBuf::from).collect();
491
+ let mut ld_paths: Vec<PathBuf> = artifact.linked_paths.iter().map(PathBuf::from).collect();
492
+
493
+ // Add library search paths from RUSTFLAGS
494
+ if let Some(rustflags_paths) = extract_rustflags_library_paths(manifest_path, target) {
495
+ ld_paths.extend(rustflags_paths);
496
+ }
497
+
491
498
  let external_libs = find_external_libs(&artifact.path, &policy, sysroot, ld_paths)
492
499
  .with_context(|| {
493
500
  if let Some(platform_tag) = platform_tag {
@@ -510,6 +517,30 @@ pub fn get_policy_and_libs(
510
517
  Ok((policy, external_libs))
511
518
  }
512
519
 
520
+ /// Extract library search paths from RUSTFLAGS configuration
521
+ #[cfg_attr(test, allow(dead_code))]
522
+ fn extract_rustflags_library_paths(manifest_path: &Path, target: &Target) -> Option<Vec<PathBuf>> {
523
+ let manifest_dir = manifest_path.parent()?;
524
+ let config = cargo_config2::Config::load_with_cwd(manifest_dir).ok()?;
525
+ let rustflags = config.rustflags(target.target_triple()).ok()??;
526
+
527
+ // Encode the rustflags for parsing with the rustflags crate
528
+ let encoded = rustflags.encode().ok()?;
529
+
530
+ let mut library_paths = Vec::new();
531
+ for flag in rustflags::from_encoded(encoded.as_ref()) {
532
+ if let rustflags::Flag::LibrarySearchPath { kind: _, path } = flag {
533
+ library_paths.push(path);
534
+ }
535
+ }
536
+
537
+ if library_paths.is_empty() {
538
+ None
539
+ } else {
540
+ Some(library_paths)
541
+ }
542
+ }
543
+
513
544
  pub fn relpath(to: &Path, from: &Path) -> PathBuf {
514
545
  let mut suffix_pos = 0;
515
546
  for (f, t) in from.components().zip(to.components()) {
@@ -534,6 +565,7 @@ pub fn relpath(to: &Path, from: &Path) -> PathBuf {
534
565
  #[cfg(test)]
535
566
  mod test {
536
567
  use crate::auditwheel::audit::relpath;
568
+ use crate::Target;
537
569
  use pretty_assertions::assert_eq;
538
570
  use std::path::Path;
539
571
 
@@ -551,4 +583,81 @@ mod test {
551
583
  assert_eq!(result, Path::new(expected));
552
584
  }
553
585
  }
586
+
587
+ #[test]
588
+ fn test_extract_rustflags_library_paths() {
589
+ // Create a temporary directory with a Cargo.toml and .cargo/config.toml
590
+ let temp_dir = tempfile::tempdir().unwrap();
591
+ let manifest_path = temp_dir.path().join("Cargo.toml");
592
+ let cargo_dir = temp_dir.path().join(".cargo");
593
+ let config_path = cargo_dir.join("config.toml");
594
+
595
+ // Create the directories
596
+ fs_err::create_dir_all(&cargo_dir).unwrap();
597
+
598
+ // Create a minimal Cargo.toml
599
+ fs_err::write(
600
+ &manifest_path,
601
+ r#"
602
+ [package]
603
+ name = "test-package"
604
+ version = "0.1.0"
605
+ edition = "2021"
606
+ "#,
607
+ )
608
+ .unwrap();
609
+
610
+ // Create a config.toml with rustflags containing -L options
611
+ fs_err::write(
612
+ &config_path,
613
+ r#"
614
+ [build]
615
+ rustflags = ["-L", "dependency=/usr/local/lib", "-L", "/some/other/path", "-C", "opt-level=3"]
616
+ "#,
617
+ )
618
+ .unwrap();
619
+
620
+ // Test the function
621
+ let target = Target::from_target_triple(None).unwrap();
622
+ let paths = super::extract_rustflags_library_paths(&manifest_path, &target);
623
+
624
+ if let Some(paths) = paths {
625
+ assert_eq!(paths.len(), 2);
626
+ assert!(paths
627
+ .iter()
628
+ .any(|p| p.to_string_lossy() == "/usr/local/lib"));
629
+ assert!(paths
630
+ .iter()
631
+ .any(|p| p.to_string_lossy() == "/some/other/path"));
632
+ } else {
633
+ // It's possible that rustflags parsing fails in some environments,
634
+ // so we just verify the function doesn't panic
635
+ println!("No rustflags library paths found, which is acceptable");
636
+ }
637
+ }
638
+
639
+ #[test]
640
+ fn test_extract_rustflags_library_paths_no_config() {
641
+ // Test with a directory that has no cargo config
642
+ let temp_dir = tempfile::tempdir().unwrap();
643
+ let manifest_path = temp_dir.path().join("Cargo.toml");
644
+
645
+ // Create a minimal Cargo.toml
646
+ fs_err::write(
647
+ &manifest_path,
648
+ r#"
649
+ [package]
650
+ name = "test-package"
651
+ version = "0.1.0"
652
+ edition = "2021"
653
+ "#,
654
+ )
655
+ .unwrap();
656
+
657
+ let target = Target::from_target_triple(None).unwrap();
658
+ let paths = super::extract_rustflags_library_paths(&manifest_path, &target);
659
+
660
+ // Should return None when there's no cargo config with rustflags
661
+ assert!(paths.is_none());
662
+ }
554
663
  }
@@ -29,7 +29,7 @@
29
29
  "ZLIB": []
30
30
  }
31
31
  },
32
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libz.so.1"],
32
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libz.so.1"],
33
33
  "blacklist": {
34
34
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "uncompress2", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
35
35
  }
@@ -56,7 +56,7 @@
56
56
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4"]
57
57
  }
58
58
  },
59
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
59
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
60
60
  "blacklist": {
61
61
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "uncompress2", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
62
62
  }
@@ -123,7 +123,7 @@
123
123
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2"]
124
124
  }
125
125
  },
126
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
126
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
127
127
  "blacklist": {
128
128
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "uncompress2", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
129
129
  }
@@ -182,7 +182,66 @@
182
182
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2"]
183
183
  }
184
184
  },
185
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
185
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
186
+ "blacklist": {
187
+ "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "uncompress2", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
188
+ }
189
+ },
190
+ {
191
+ "name": "manylinux_2_26",
192
+ "aliases": [],
193
+ "priority": 68,
194
+ "symbol_versions": {
195
+ "i686": {
196
+ "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "FLOAT128", "TM_1"],
197
+ "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "4.0.0", "4.2.0", "4.3.0", "4.4.0", "4.5.0", "4.7.0", "4.8.0", "7.0.0"],
198
+ "GLIBC": ["2.0", "2.1", "2.1.1", "2.1.2", "2.1.3", "2.2", "2.2.1", "2.2.2", "2.2.3", "2.2.4", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26"],
199
+ "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"],
200
+ "LIBATOMIC": ["1.0", "1.1", "1.2"],
201
+ "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
202
+ },
203
+ "x86_64": {
204
+ "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "FLOAT128", "TM_1"],
205
+ "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "4.8.0"],
206
+ "GLIBC": ["2.2.5", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26"],
207
+ "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22"],
208
+ "LIBATOMIC": ["1.0", "1.1", "1.2"],
209
+ "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2"]
210
+ },
211
+ "aarch64": {
212
+ "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "TM_1"],
213
+ "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.5.0", "4.7.0", "7.0.0"],
214
+ "GLIBC": ["2.0", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26"],
215
+ "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"],
216
+ "LIBATOMIC": ["1.0", "1.1", "1.2"],
217
+ "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2"]
218
+ },
219
+ "ppc64le": {
220
+ "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "LDBL_1.3", "TM_1"],
221
+ "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"],
222
+ "GLIBC": ["2.0", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26"],
223
+ "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24", "LDBL_3.4", "LDBL_3.4.10", "LDBL_3.4.21", "LDBL_3.4.7"],
224
+ "LIBATOMIC": ["1.0", "1.1", "1.2"],
225
+ "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
226
+ },
227
+ "s390x": {
228
+ "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "LDBL_1.3", "TM_1"],
229
+ "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.1.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"],
230
+ "GLIBC": ["2.2", "2.2.1", "2.2.2", "2.2.3", "2.2.4", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.19", "2.22", "2.23", "2.24", "2.25", "2.26"],
231
+ "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24", "LDBL_3.4", "LDBL_3.4.10", "LDBL_3.4.21", "LDBL_3.4.7"],
232
+ "LIBATOMIC": ["1.0", "1.1", "1.2"],
233
+ "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
234
+ },
235
+ "armv7l": {
236
+ "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "ARM_1.3.3", "TM_1"],
237
+ "GCC": ["3.0", "3.3", "3.3.1", "3.3.4", "3.4", "3.4.2", "3.5", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"],
238
+ "GLIBC": ["2.0", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26"],
239
+ "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"],
240
+ "LIBATOMIC": ["1.0", "1.1", "1.2"],
241
+ "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
242
+ }
243
+ },
244
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
186
245
  "blacklist": {
187
246
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "uncompress2", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
188
247
  }
@@ -241,7 +300,7 @@
241
300
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
242
301
  }
243
302
  },
244
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
303
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
245
304
  "blacklist": {
246
305
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "uncompress2", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
247
306
  }
@@ -300,7 +359,7 @@
300
359
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
301
360
  }
302
361
  },
303
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
362
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
304
363
  "blacklist": {
305
364
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "uncompress2", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
306
365
  }
@@ -367,7 +426,7 @@
367
426
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
368
427
  }
369
428
  },
370
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
429
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
371
430
  "blacklist": {
372
431
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "uncompress2", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
373
432
  }
@@ -434,7 +493,7 @@
434
493
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
435
494
  }
436
495
  },
437
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
496
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
438
497
  "blacklist": {
439
498
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
440
499
  }
@@ -501,7 +560,7 @@
501
560
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
502
561
  }
503
562
  },
504
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
563
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
505
564
  "blacklist": {
506
565
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "bi_windup", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "crc_fold_512to32", "crc_fold_copy", "crc_fold_init", "deflate_copyright", "deflate_medium", "fill_window", "flush_pending", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "longest_match", "slide_hash_sse", "static_ltree", "x86_check_features", "x86_cpu_has_pclmul", "x86_cpu_has_sse2", "x86_cpu_has_sse42", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
507
566
  }
@@ -576,7 +635,7 @@
576
635
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9"]
577
636
  }
578
637
  },
579
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
638
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
580
639
  "blacklist": {
581
640
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "crc32_acle", "crc32_combine_gen", "crc32_combine_gen64", "crc32_combine_op", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "deflate_copyright", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
582
641
  }
@@ -651,7 +710,7 @@
651
710
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9", "1.2.12"]
652
711
  }
653
712
  },
654
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
713
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
655
714
  "blacklist": {
656
715
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "crc32_acle", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "deflate_copyright", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
657
716
  }
@@ -726,7 +785,7 @@
726
785
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9", "1.2.12"]
727
786
  }
728
787
  },
729
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
788
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
730
789
  "blacklist": {
731
790
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "crc32_acle", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "deflate_copyright", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
732
791
  }
@@ -801,7 +860,7 @@
801
860
  "ZLIB": ["1.2.0", "1.2.0.2", "1.2.0.8", "1.2.2", "1.2.2.3", "1.2.2.4", "1.2.3.3", "1.2.3.4", "1.2.3.5", "1.2.5.1", "1.2.5.2", "1.2.7.1", "1.2.9", "1.2.12"]
802
861
  }
803
862
  },
804
- "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
863
+ "lib_whitelist": ["libatomic.so.1", "libgcc_s.so.1", "libstdc++.so.6", "libm.so.6", "libanl.so.1", "libdl.so.2", "librt.so.1", "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2", "libexpat.so.1", "libz.so.1"],
805
864
  "blacklist": {
806
865
  "libz.so.1": ["_dist_code", "_length_code", "_tr_align", "_tr_flush_block", "_tr_init", "_tr_stored_block", "_tr_tally", "adler32_default", "crc32_acle", "crc32_le_vgfm_16", "crc32_neon", "crc32_vpmsum", "crc32_z_default", "deflate_copyright", "gzflags", "inflate_copyright", "inflate_fast", "inflate_table", "z_errmsg", "z_vstring", "zcalloc", "zcfree"]
807
866
  }
@@ -345,12 +345,19 @@ impl BuildContext {
345
345
  artifact,
346
346
  Some(musllinux[0]),
347
347
  &self.target,
348
+ &self.manifest_path,
348
349
  allow_linking_libpython,
349
350
  );
350
351
  }
351
352
 
352
353
  let tag = others.first().or_else(|| musllinux.first()).copied();
353
- get_policy_and_libs(artifact, tag, &self.target, allow_linking_libpython)
354
+ get_policy_and_libs(
355
+ artifact,
356
+ tag,
357
+ &self.target,
358
+ &self.manifest_path,
359
+ allow_linking_libpython,
360
+ )
354
361
  }
355
362
 
356
363
  /// Add library search paths in Cargo target directory rpath when building in editable mode
@@ -67,7 +67,7 @@ impl InstallBackend {
67
67
  };
68
68
  if let Some(captures) = re.expect("regex should be valid").captures(stdout) {
69
69
  Ok(semver::Version::parse(&captures[1])
70
- .with_context(|| format!("failed to parse semver from {:?}", stdout))?)
70
+ .with_context(|| format!("failed to parse semver from {stdout:?}"))?)
71
71
  } else {
72
72
  bail!("failed to parse version from {:?}", stdout);
73
73
  }
@@ -321,7 +321,7 @@ fn install_wheel(
321
321
  );
322
322
  }
323
323
  if let Err(err) = configure_as_editable(build_context, python, install_backend) {
324
- eprintln!("⚠️ Warning: failed to set package as editable: {}", err);
324
+ eprintln!("⚠️ Warning: failed to set package as editable: {err}");
325
325
  }
326
326
  Ok(())
327
327
  }
@@ -40,6 +40,7 @@ pub use crate::module_writer::{
40
40
  pub use crate::new_project::{init_project, new_project, GenerateProjectOptions};
41
41
  pub use crate::pyproject_toml::PyProjectToml;
42
42
  pub use crate::python_interpreter::PythonInterpreter;
43
+ pub use crate::source_distribution::find_path_deps;
43
44
  #[cfg(feature = "upload")]
44
45
  pub use crate::upload::{upload, upload_ui, PublishOpt, Registry, UploadError};
45
46
  pub use auditwheel::PlatformTag;
@@ -13,8 +13,8 @@ use clap::{Parser, Subcommand};
13
13
  #[cfg(feature = "scaffolding")]
14
14
  use maturin::{ci::GenerateCI, init_project, new_project, GenerateProjectOptions};
15
15
  use maturin::{
16
- develop, write_dist_info, BridgeModel, BuildOptions, CargoOptions, DevelopOptions, PathWriter,
17
- PythonInterpreter, Target, TargetTriple,
16
+ develop, find_path_deps, write_dist_info, BridgeModel, BuildOptions, CargoOptions,
17
+ DevelopOptions, PathWriter, PythonInterpreter, Target, TargetTriple,
18
18
  };
19
19
  #[cfg(feature = "schemars")]
20
20
  use maturin::{generate_json_schema, GenerateJsonSchemaOptions};
@@ -433,13 +433,29 @@ fn run() -> Result<()> {
433
433
  develop(develop_options, &venv_dir)?;
434
434
  }
435
435
  Command::SDist { manifest_path, out } => {
436
+ // Get cargo metadata to check for path dependencies
437
+ let cargo_metadata_result = cargo_metadata::MetadataCommand::new()
438
+ .cargo_path("cargo")
439
+ .manifest_path(
440
+ manifest_path
441
+ .as_deref()
442
+ .unwrap_or_else(|| std::path::Path::new("Cargo.toml")),
443
+ )
444
+ .verbose(true)
445
+ .exec();
446
+
447
+ let has_path_deps = cargo_metadata_result
448
+ .ok()
449
+ .and_then(|metadata| find_path_deps(&metadata).ok())
450
+ .map(|path_deps| !path_deps.is_empty())
451
+ .unwrap_or(false); // If we can't get metadata, don't force all features
436
452
  let build_options = BuildOptions {
437
453
  out,
438
454
  cargo: CargoOptions {
439
455
  manifest_path,
440
- // Enable all features to ensure all optional path dependencies are packaged
441
- // into source distribution
442
- all_features: true,
456
+ // Only enable all features when we have local path dependencies
457
+ // to ensure they are packaged into source distribution
458
+ all_features: has_path_deps,
443
459
  ..Default::default()
444
460
  },
445
461
  ..Default::default()
@@ -55,7 +55,7 @@ pub struct Metadata24 {
55
55
  pub maintainer: Option<String>,
56
56
  pub maintainer_email: Option<String>,
57
57
  pub license: Option<String>,
58
- // https://peps.python.org/pep-0639/#license-file-multiple-use
58
+ pub license_expression: Option<String>,
59
59
  pub license_files: Vec<PathBuf>,
60
60
  pub classifiers: Vec<String>,
61
61
  pub requires_dist: Vec<Requirement>,
@@ -90,6 +90,7 @@ impl Metadata24 {
90
90
  maintainer: None,
91
91
  maintainer_email: None,
92
92
  license: None,
93
+ license_expression: None,
93
94
  license_files: vec![],
94
95
  classifiers: vec![],
95
96
  requires_dist: vec![],
@@ -147,6 +148,41 @@ impl Metadata24 {
147
148
  bail!("`project.dynamic` must not specify `name` in pyproject.toml");
148
149
  }
149
150
 
151
+ // According to PEP 621, build backends must not add metadata fields
152
+ // that are not declared in the dynamic list. Clear fields from Cargo.toml
153
+ // that are not in the dynamic list.
154
+ if !dynamic.contains("description") {
155
+ self.summary = None;
156
+ }
157
+ if !dynamic.contains("authors") {
158
+ self.author = None;
159
+ self.author_email = None;
160
+ }
161
+ if !dynamic.contains("maintainers") {
162
+ self.maintainer = None;
163
+ self.maintainer_email = None;
164
+ }
165
+ if !dynamic.contains("keywords") {
166
+ self.keywords = None;
167
+ }
168
+ if !dynamic.contains("urls") {
169
+ self.project_url.clear();
170
+ }
171
+ if !dynamic.contains("license") {
172
+ self.license = None;
173
+ // Don't clear license_files as they may come from auto-discovery
174
+ }
175
+ if !dynamic.contains("classifiers") {
176
+ self.classifiers.clear();
177
+ }
178
+ if !dynamic.contains("readme") {
179
+ self.description = None;
180
+ self.description_content_type = None;
181
+ }
182
+ if !dynamic.contains("requires-python") {
183
+ self.requires_python = None;
184
+ }
185
+
150
186
  self.name.clone_from(&project.name);
151
187
 
152
188
  let version_ok = pyproject_toml.warn_invalid_version_info();
@@ -222,8 +258,11 @@ impl Metadata24 {
222
258
 
223
259
  if let Some(license) = &project.license {
224
260
  match license {
225
- // TODO: switch to License-Expression core metadata, see https://peps.python.org/pep-0639/#add-license-expression-field
226
- License::Spdx(license_expr) => self.license = Some(license_expr.clone()),
261
+ // PEP 639
262
+ License::Spdx(license_expr) => {
263
+ self.license_expression = Some(license_expr.clone())
264
+ }
265
+ // Deprecated by PEP 639
227
266
  License::File { file } => {
228
267
  self.license_files.push(file.to_path_buf());
229
268
  }
@@ -548,6 +587,9 @@ impl Metadata24 {
548
587
  add_option("Author-email", &self.author_email);
549
588
  add_option("Maintainer", &self.maintainer);
550
589
  add_option("Maintainer-email", &self.maintainer_email);
590
+ // PEP 639
591
+ add_option("License-Expression", &self.license_expression);
592
+ // Deprecated by PEP 639
551
593
  add_option("License", &self.license.as_deref().map(fold_header));
552
594
  add_option(
553
595
  "Requires-Python",
@@ -681,6 +723,7 @@ mod test {
681
723
  use expect_test::{expect, Expect};
682
724
  use indoc::indoc;
683
725
  use pretty_assertions::assert_eq;
726
+ use tempfile::TempDir;
684
727
 
685
728
  fn assert_metadata_from_cargo_toml(
686
729
  readme: &str,
@@ -882,6 +925,23 @@ A test project
882
925
  );
883
926
  }
884
927
 
928
+ #[test]
929
+ fn test_pep639() {
930
+ let manifest_dir = PathBuf::from("test-crates").join("pyo3-mixed");
931
+ let cargo_metadata = MetadataCommand::new()
932
+ .manifest_path(manifest_dir.join("Cargo.toml"))
933
+ .exec()
934
+ .unwrap();
935
+ let mut metadata = Metadata24::from_cargo_toml(&manifest_dir, &cargo_metadata).unwrap();
936
+ let pyproject_toml = PyProjectToml::new(manifest_dir.join("pyproject.toml")).unwrap();
937
+ metadata
938
+ .merge_pyproject_toml(&manifest_dir, &pyproject_toml)
939
+ .unwrap();
940
+
941
+ assert_eq!(metadata.license_expression.as_ref().unwrap(), "MIT");
942
+ assert_eq!(metadata.license.as_ref(), None);
943
+ }
944
+
885
945
  #[test]
886
946
  fn test_merge_metadata_from_pyproject_dynamic_license_test() {
887
947
  let manifest_dir = PathBuf::from("test-crates").join("license-test");
@@ -948,4 +1008,149 @@ A test project
948
1008
  assert_eq!(result, expected);
949
1009
  }
950
1010
  }
1011
+
1012
+ #[test]
1013
+ fn test_issue_2544_respect_pyproject_dynamic_without_dynamic_fields() {
1014
+ let temp_dir = TempDir::new().unwrap();
1015
+ let crate_path = temp_dir.path();
1016
+ let manifest_path = crate_path.join("Cargo.toml");
1017
+ let pyproject_path = crate_path.join("pyproject.toml");
1018
+
1019
+ // Create basic src structure
1020
+ fs::create_dir(crate_path.join("src")).unwrap();
1021
+ fs::write(crate_path.join("src/lib.rs"), "").unwrap();
1022
+
1023
+ // Write Cargo.toml with metadata that should NOT be included
1024
+ // because pyproject.toml doesn't declare them as dynamic
1025
+ let cargo_toml = indoc!(
1026
+ r#"
1027
+ [package]
1028
+ name = "test-package"
1029
+ version = "0.1.0"
1030
+ description = "Description from Cargo.toml - should not appear"
1031
+ authors = ["author from cargo.toml <author@example.com>"]
1032
+ keywords = ["cargo", "toml", "keyword"]
1033
+ repository = "https://github.com/example/repo"
1034
+
1035
+ [lib]
1036
+ crate-type = ["cdylib"]
1037
+ "#
1038
+ );
1039
+ fs::write(&manifest_path, cargo_toml).unwrap();
1040
+
1041
+ // Write pyproject.toml WITHOUT declaring the fields as dynamic
1042
+ let pyproject_toml_content = indoc!(
1043
+ r#"
1044
+ [build-system]
1045
+ requires = ["maturin>=1.0,<2.0"]
1046
+ build-backend = "maturin"
1047
+
1048
+ [project]
1049
+ name = "test-package"
1050
+ version = "0.1.0"
1051
+ # Note: no description, authors, keywords, urls in dynamic list
1052
+ # dynamic = [] # Not specified, so defaults to empty
1053
+ "#
1054
+ );
1055
+ fs::write(&pyproject_path, pyproject_toml_content).unwrap();
1056
+
1057
+ // Load metadata as maturin does
1058
+ let cargo_metadata = MetadataCommand::new()
1059
+ .manifest_path(&manifest_path)
1060
+ .exec()
1061
+ .unwrap();
1062
+ let mut metadata = Metadata24::from_cargo_toml(crate_path, &cargo_metadata).unwrap();
1063
+ let pyproject_toml = PyProjectToml::new(&pyproject_path).unwrap();
1064
+ metadata
1065
+ .merge_pyproject_toml(crate_path, &pyproject_toml)
1066
+ .unwrap();
1067
+
1068
+ assert_eq!(
1069
+ metadata.summary, None,
1070
+ "summary should be None when not in dynamic list"
1071
+ );
1072
+ assert_eq!(
1073
+ metadata.author, None,
1074
+ "author should be None when not in dynamic list"
1075
+ );
1076
+ assert_eq!(
1077
+ metadata.keywords, None,
1078
+ "keywords should be None when not in dynamic list"
1079
+ );
1080
+ assert!(
1081
+ metadata.project_url.is_empty(),
1082
+ "project_url should be empty when not in dynamic list"
1083
+ );
1084
+ }
1085
+
1086
+ #[test]
1087
+ fn test_issue_2544_respect_pyproject_dynamic_with_dynamic_fields() {
1088
+ let temp_dir = TempDir::new().unwrap();
1089
+ let crate_path = temp_dir.path();
1090
+ let manifest_path = crate_path.join("Cargo.toml");
1091
+ let pyproject_path = crate_path.join("pyproject.toml");
1092
+
1093
+ // Create basic src structure
1094
+ fs::create_dir(crate_path.join("src")).unwrap();
1095
+ fs::write(crate_path.join("src/lib.rs"), "").unwrap();
1096
+
1097
+ // Write Cargo.toml with metadata
1098
+ let cargo_toml = indoc!(
1099
+ r#"
1100
+ [package]
1101
+ name = "test-package"
1102
+ version = "0.1.0"
1103
+ description = "Description from Cargo.toml - should appear"
1104
+ authors = ["author from cargo.toml <author@example.com>"]
1105
+ keywords = ["cargo", "toml", "keyword"]
1106
+ repository = "https://github.com/example/repo"
1107
+
1108
+ [lib]
1109
+ crate-type = ["cdylib"]
1110
+ "#
1111
+ );
1112
+ fs::write(&manifest_path, cargo_toml).unwrap();
1113
+
1114
+ // Write pyproject.toml WITH fields declared as dynamic
1115
+ let pyproject_toml_content = indoc!(
1116
+ r#"
1117
+ [build-system]
1118
+ requires = ["maturin>=1.0,<2.0"]
1119
+ build-backend = "maturin"
1120
+
1121
+ [project]
1122
+ name = "test-package"
1123
+ version = "0.1.0"
1124
+ # Fields declared as dynamic - should come from Cargo.toml
1125
+ dynamic = ["description", "authors", "keywords", "urls"]
1126
+ "#
1127
+ );
1128
+ fs::write(&pyproject_path, pyproject_toml_content).unwrap();
1129
+
1130
+ // Load metadata as maturin does
1131
+ let cargo_metadata = MetadataCommand::new()
1132
+ .manifest_path(&manifest_path)
1133
+ .exec()
1134
+ .unwrap();
1135
+ let mut metadata = Metadata24::from_cargo_toml(crate_path, &cargo_metadata).unwrap();
1136
+ let pyproject_toml = PyProjectToml::new(&pyproject_path).unwrap();
1137
+ metadata
1138
+ .merge_pyproject_toml(crate_path, &pyproject_toml)
1139
+ .unwrap();
1140
+
1141
+ // These fields SHOULD be set because they are in dynamic list
1142
+ assert_eq!(
1143
+ metadata.summary,
1144
+ Some("Description from Cargo.toml - should appear".to_string())
1145
+ );
1146
+ assert_eq!(
1147
+ metadata.author,
1148
+ Some("author from cargo.toml <author@example.com>".to_string())
1149
+ );
1150
+ assert_eq!(metadata.keywords, Some("cargo,toml,keyword".to_string()));
1151
+ assert_eq!(
1152
+ metadata.project_url.get("Source Code"),
1153
+ Some(&"https://github.com/example/repo".to_string())
1154
+ );
1155
+ }
951
1156
  }
@@ -301,23 +301,20 @@ mod package_name_validations {
301
301
  }
302
302
  if ["core", "std", "alloc", "proc_macro", "proc-macro"].contains(&name) {
303
303
  eprintln!(
304
- "⚠️ Warning: the name `{}` is part of Rust's standard library\n\
304
+ "⚠️ Warning: the name `{name}` is part of Rust's standard library\n\
305
305
  It is recommended to use a different name to avoid problems.",
306
- name,
307
306
  );
308
307
  }
309
308
  if is_windows_reserved(name) {
310
309
  eprintln!(
311
- "⚠️ Warning: the name `{}` is a reserved Windows filename\n\
310
+ "⚠️ Warning: the name `{name}` is a reserved Windows filename\n\
312
311
  This package will not work on Windows platforms.",
313
- name
314
312
  );
315
313
  }
316
314
  if is_non_ascii_name(name) {
317
315
  eprintln!(
318
- "⚠️ Warning: the name `{}` contains non-ASCII characters\n\
316
+ "⚠️ Warning: the name `{name}` contains non-ASCII characters\n\
319
317
  Non-ASCII crate names are not supported by Rust.",
320
- name
321
318
  );
322
319
  }
323
320
  let name_in_lowercase = name.to_lowercase();
@@ -379,10 +379,7 @@ impl PyProjectToml {
379
379
  if !version_specifier.contains(&self_version) {
380
380
  eprintln!(
381
381
  "⚠️ Warning: You specified {requires_maturin} in pyproject.toml under \
382
- `build-system.requires`, but the current {maturin} version is {version}",
383
- requires_maturin = requires_maturin,
384
- maturin = maturin,
385
- version = self_version,
382
+ `build-system.requires`, but the current {maturin} version is {self_version}",
386
383
  );
387
384
  return false;
388
385
  }
@@ -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};
@@ -25,7 +26,7 @@ use tracing::{debug, trace};
25
26
  /// foo = { path = "path/to/foo" }
26
27
  /// ```
27
28
  #[derive(Debug, Clone)]
28
- struct PathDependency {
29
+ pub struct PathDependency {
29
30
  /// `Cargo.toml` path of the path dependency
30
31
  manifest_path: PathBuf,
31
32
  /// workspace root of the path dependency
@@ -307,7 +308,7 @@ fn add_crate_to_source_distribution(
307
308
  }
308
309
 
309
310
  /// Finds all path dependencies of the crate
310
- fn find_path_deps(cargo_metadata: &Metadata) -> Result<HashMap<String, PathDependency>> {
311
+ pub fn find_path_deps(cargo_metadata: &Metadata) -> Result<HashMap<String, PathDependency>> {
311
312
  let root = cargo_metadata
312
313
  .root_package()
313
314
  .context("Expected the dependency graph to have a root package")?;
@@ -370,8 +371,7 @@ fn find_path_deps(cargo_metadata: &Metadata) -> Result<HashMap<String, PathDepen
370
371
  .exec()
371
372
  .with_context(|| {
372
373
  format!(
373
- "Failed to resolve workspace root for {} at '{}'",
374
- dep_id, dep_manifest_path
374
+ "Failed to resolve workspace root for {dep_id} at '{dep_manifest_path}'"
375
375
  )
376
376
  })?;
377
377
 
@@ -481,7 +481,7 @@ fn add_cargo_package_files_to_sdist(
481
481
  name,
482
482
  path_dep,
483
483
  )
484
- .with_context(|| format!("Failed to add path dependency {}", name))?;
484
+ .with_context(|| format!("Failed to add path dependency {name}"))?;
485
485
  }
486
486
 
487
487
  debug!("Adding the main crate {}", manifest_path.display());
@@ -502,17 +502,8 @@ fn add_cargo_package_files_to_sdist(
502
502
  .unwrap()
503
503
  .strip_prefix(&sdist_root)
504
504
  .unwrap();
505
- add_crate_to_source_distribution(
506
- writer,
507
- manifest_path,
508
- root_dir.join(relative_main_crate_manifest_dir),
509
- None,
510
- &known_path_deps,
511
- true,
512
- false,
513
- )?;
514
505
  // Handle possible relative readme field in Cargo.toml
515
- if let Some(readme) = main_crate.readme.as_ref() {
506
+ let readme_path = if let Some(readme) = main_crate.readme.as_ref() {
516
507
  let readme = abs_manifest_dir.join(readme);
517
508
  let abs_readme = readme
518
509
  .normalize()
@@ -531,7 +522,19 @@ fn add_cargo_package_files_to_sdist(
531
522
  .join(readme.file_name().unwrap()),
532
523
  &abs_readme,
533
524
  )?;
534
- }
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
+ )?;
535
538
 
536
539
  // Add Cargo.lock file and workspace Cargo.toml
537
540
  let manifest_cargo_lock_path = abs_manifest_dir.join("Cargo.lock");
@@ -786,6 +789,34 @@ pub fn source_distribution(
786
789
  if let Some(pyproject_toml::License::File { file }) = project.license.as_ref() {
787
790
  writer.add_file(root_dir.join(file), pyproject_dir.join(file))?;
788
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
+ }
789
820
  }
790
821
 
791
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 {
@@ -225,7 +225,7 @@ fn resolve_pypi_cred(
225
225
  return Ok(("__token__".to_string(), token));
226
226
  }
227
227
  Ok(None) => {}
228
- Err(e) => eprintln!("⚠️ Warning: Failed to resolve PyPI token via OIDC: {}", e),
228
+ Err(e) => eprintln!("⚠️ Warning: Failed to resolve PyPI token via OIDC: {e}"),
229
229
  }
230
230
 
231
231
  if let Some((username, password)) =
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