maturin 1.9.2__tar.gz → 1.9.4__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.4}/.pre-commit-config.yaml +3 -3
  2. {maturin-1.9.2 → maturin-1.9.4}/Cargo.lock +1 -1
  3. {maturin-1.9.2 → maturin-1.9.4}/Cargo.toml +2 -2
  4. {maturin-1.9.2 → maturin-1.9.4}/Changelog.md +14 -2
  5. {maturin-1.9.2 → maturin-1.9.4}/PKG-INFO +3 -1
  6. {maturin-1.9.2 → maturin-1.9.4}/README.md +1 -0
  7. {maturin-1.9.2 → maturin-1.9.4}/maturin/__init__.py +1 -1
  8. {maturin-1.9.2 → maturin-1.9.4}/maturin.schema.json +5 -0
  9. {maturin-1.9.2 → maturin-1.9.4}/pyproject.toml +2 -1
  10. {maturin-1.9.2 → maturin-1.9.4}/src/build_context.rs +10 -3
  11. {maturin-1.9.2 → maturin-1.9.4}/src/compile.rs +5 -0
  12. {maturin-1.9.2 → maturin-1.9.4}/src/module_writer.rs +1 -1
  13. {maturin-1.9.2 → maturin-1.9.4}/src/pyproject_toml.rs +7 -0
  14. {maturin-1.9.2 → maturin-1.9.4}/src/python_interpreter/config.rs +48 -2
  15. {maturin-1.9.2 → maturin-1.9.4}/src/python_interpreter/mod.rs +1 -1
  16. {maturin-1.9.2 → maturin-1.9.4}/src/source_distribution.rs +44 -12
  17. {maturin-1.9.2 → maturin-1.9.4}/src/target/legacy_py.rs +1 -1
  18. {maturin-1.9.2 → maturin-1.9.4}/src/target/mod.rs +1 -1
  19. {maturin-1.9.2 → maturin-1.9.4}/src/target/pypi_tags.rs +9 -7
  20. {maturin-1.9.2 → maturin-1.9.4}/.cirrus.yml +0 -0
  21. {maturin-1.9.2 → maturin-1.9.4}/.codespellrc +0 -0
  22. {maturin-1.9.2 → maturin-1.9.4}/.config/nextest.toml +0 -0
  23. {maturin-1.9.2 → maturin-1.9.4}/.gitignore +0 -0
  24. {maturin-1.9.2 → maturin-1.9.4}/MANIFEST.in +0 -0
  25. {maturin-1.9.2 → maturin-1.9.4}/clippy.toml +0 -0
  26. {maturin-1.9.2 → maturin-1.9.4}/license-apache +0 -0
  27. {maturin-1.9.2 → maturin-1.9.4}/license-mit +0 -0
  28. {maturin-1.9.2 → maturin-1.9.4}/maturin/__main__.py +0 -0
  29. {maturin-1.9.2 → maturin-1.9.4}/maturin/bootstrap.py +0 -0
  30. {maturin-1.9.2 → maturin-1.9.4}/netlify.toml +0 -0
  31. {maturin-1.9.2 → maturin-1.9.4}/setup.py +0 -0
  32. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/audit.rs +0 -0
  33. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/manylinux-policy.json +0 -0
  34. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/mod.rs +0 -0
  35. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/musllinux-policy.json +0 -0
  36. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/musllinux.rs +0 -0
  37. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/patchelf.rs +0 -0
  38. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/platform_tag.rs +0 -0
  39. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/policy.rs +0 -0
  40. {maturin-1.9.2 → maturin-1.9.4}/src/auditwheel/repair.rs +0 -0
  41. {maturin-1.9.2 → maturin-1.9.4}/src/bridge.rs +0 -0
  42. {maturin-1.9.2 → maturin-1.9.4}/src/build_options.rs +0 -0
  43. {maturin-1.9.2 → maturin-1.9.4}/src/cargo_toml.rs +0 -0
  44. {maturin-1.9.2 → maturin-1.9.4}/src/ci.rs +0 -0
  45. {maturin-1.9.2 → maturin-1.9.4}/src/compression.rs +0 -0
  46. {maturin-1.9.2 → maturin-1.9.4}/src/cross_compile.rs +0 -0
  47. {maturin-1.9.2 → maturin-1.9.4}/src/develop.rs +0 -0
  48. {maturin-1.9.2 → maturin-1.9.4}/src/generate_json_schema.rs +0 -0
  49. {maturin-1.9.2 → maturin-1.9.4}/src/lib.rs +0 -0
  50. {maturin-1.9.2 → maturin-1.9.4}/src/main.rs +0 -0
  51. {maturin-1.9.2 → maturin-1.9.4}/src/metadata.rs +0 -0
  52. {maturin-1.9.2 → maturin-1.9.4}/src/new_project.rs +0 -0
  53. {maturin-1.9.2 → maturin-1.9.4}/src/project_layout.rs +0 -0
  54. {maturin-1.9.2 → maturin-1.9.4}/src/python_interpreter/get_interpreter_metadata.py +0 -0
  55. {maturin-1.9.2 → maturin-1.9.4}/src/templates/.gitignore.j2 +0 -0
  56. {maturin-1.9.2 → maturin-1.9.4}/src/templates/Cargo.toml.j2 +0 -0
  57. {maturin-1.9.2 → maturin-1.9.4}/src/templates/__init__.py.j2 +0 -0
  58. {maturin-1.9.2 → maturin-1.9.4}/src/templates/build.rs.j2 +0 -0
  59. {maturin-1.9.2 → maturin-1.9.4}/src/templates/example.udl.j2 +0 -0
  60. {maturin-1.9.2 → maturin-1.9.4}/src/templates/lib.rs.j2 +0 -0
  61. {maturin-1.9.2 → maturin-1.9.4}/src/templates/main.rs.j2 +0 -0
  62. {maturin-1.9.2 → maturin-1.9.4}/src/templates/pyproject.toml.j2 +0 -0
  63. {maturin-1.9.2 → maturin-1.9.4}/src/templates/test_all.py.j2 +0 -0
  64. {maturin-1.9.2 → maturin-1.9.4}/src/upload.rs +0 -0
@@ -38,7 +38,7 @@ repos:
38
38
  types: [rust]
39
39
  stages: [manual] # because it's slow
40
40
  - repo: https://github.com/pre-commit/pre-commit-hooks
41
- rev: v5.0.0
41
+ rev: v6.0.0
42
42
  hooks:
43
43
  - id: check-yaml
44
44
  - id: check-toml
@@ -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.4
59
+ rev: v0.12.10
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.17.0
64
+ rev: v1.17.1
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.2"
1439
+ version = "1.9.4"
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.4"
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/**/*",
@@ -63,7 +63,7 @@ zip = { version = "2.3.0", default-features = false, features = [
63
63
  "deflate",
64
64
  "time",
65
65
  "zstd",
66
- "lzma"
66
+ "lzma",
67
67
  ] }
68
68
  thiserror = "2.0.3"
69
69
  fs-err = "3.0.0"
@@ -1,6 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## [1.9.4]
4
+
5
+ * Add a `use-base-python` option to `pyproject.toml` with the same behaviour as `MATURIN_PEP517_USE_BASE_PYTHON`.
6
+ * Add builtin sysconfigs for GraalPy
7
+ * Fix calculation of platform tag for FreeBSD
8
+
9
+ ## [1.9.3]
10
+
11
+ * Fix adding `project.license-files` to source distributions.
12
+ * Fix relative Readme rewrite of the root crate in source distributions.
4
13
 
5
14
  ## [1.9.2]
6
15
 
@@ -1089,7 +1098,10 @@ points-0.1.0-py2.py3-none-manylinux1_x86_64.whl | 2,8M | 752K | 85K
1089
1098
 
1090
1099
  * Initial Release
1091
1100
 
1092
- [Unreleased]: https://github.com/pyo3/maturin/compare/v1.9.1...HEAD
1101
+ [Unreleased]: https://github.com/pyo3/maturin/compare/v1.9.4...HEAD
1102
+ [1.9.4]: https://github.com/pyo3/maturin/compare/v1.9.3...v1.9.4
1103
+ [1.9.3]: https://github.com/pyo3/maturin/compare/v1.9.2...v1.9.3
1104
+ [1.9.2]: https://github.com/pyo3/maturin/compare/v1.9.1...v1.9.2
1093
1105
  [1.9.1]: https://github.com/pyo3/maturin/compare/v1.9.0...v1.9.1
1094
1106
  [1.9.0]: https://github.com/pyo3/maturin/compare/v1.8.7...v1.9.0
1095
1107
  [1.8.7]: https://github.com/pyo3/maturin/compare/v1.8.6...v1.8.7
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maturin
3
- Version: 1.9.2
3
+ Version: 1.9.4
4
4
  Classifier: Topic :: Software Development :: Build Tools
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: Implementation :: CPython
7
7
  Classifier: Programming Language :: Python :: Implementation :: PyPy
8
+ Classifier: Programming Language :: Python :: Implementation :: GraalPy
8
9
  Requires-Dist: tomli>=1.1.0 ; python_full_version < '3.11'
9
10
  Requires-Dist: ziglang>=0.10.0,<0.13.0 ; extra == 'zig'
10
11
  Requires-Dist: patchelf ; extra == 'patchelf'
@@ -254,6 +255,7 @@ maturin itself is manylinux compliant when compiled for the musl target.
254
255
 
255
256
  ## Examples
256
257
 
258
+ - [agg-python-bindings](https://pypi.org/project/agg-python-bindings) - A Python Library that binds to Asciinema Agg terminal record renderer and Avt terminal emulator
257
259
  - [ballista-python](https://github.com/apache/arrow-ballista-python) - A Python library that binds to Apache Arrow distributed query engine Ballista
258
260
  - [bleuscore](https://github.com/shenxiangzhuang/bleuscore) - A BLEU score calculation library, written in pure Rust
259
261
  - [chardetng-py](https://github.com/john-parton/chardetng-py) - Python binding for the chardetng character encoding detector.
@@ -229,6 +229,7 @@ maturin itself is manylinux compliant when compiled for the musl target.
229
229
 
230
230
  ## Examples
231
231
 
232
+ - [agg-python-bindings](https://pypi.org/project/agg-python-bindings) - A Python Library that binds to Asciinema Agg terminal record renderer and Avt terminal emulator
232
233
  - [ballista-python](https://github.com/apache/arrow-ballista-python) - A Python library that binds to Apache Arrow distributed query engine Ballista
233
234
  - [bleuscore](https://github.com/shenxiangzhuang/bleuscore) - A BLEU score calculation library, written in pure Rust
234
235
  - [chardetng-py](https://github.com/john-parton/chardetng-py) - Python binding for the chardetng character encoding detector.
@@ -50,7 +50,7 @@ def get_maturin_pep517_args(config_settings: Optional[Mapping[str, Any]] = None)
50
50
 
51
51
  def _get_sys_executable() -> str:
52
52
  executable = sys.executable
53
- if os.getenv("MATURIN_PEP517_USE_BASE_PYTHON") in {"1", "true"}:
53
+ if os.getenv("MATURIN_PEP517_USE_BASE_PYTHON") in {"1", "true"} or get_config().get("use-base-python"):
54
54
  # Use the base interpreter path when running inside a venv to avoid recompilation
55
55
  # when switching between venvs
56
56
  base_executable = getattr(sys, "_base_executable")
@@ -202,6 +202,11 @@
202
202
  "items": {
203
203
  "type": "string"
204
204
  }
205
+ },
206
+ "use-base-python": {
207
+ "description": "Use base Python executable instead of venv Python executable in PEP 517 build.",
208
+ "default": false,
209
+ "type": "boolean"
205
210
  }
206
211
  },
207
212
  "definitions": {
@@ -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
  ]
@@ -24,6 +24,7 @@ classifiers = [
24
24
  "Programming Language :: Rust",
25
25
  "Programming Language :: Python :: Implementation :: CPython",
26
26
  "Programming Language :: Python :: Implementation :: PyPy",
27
+ "Programming Language :: Python :: Implementation :: GraalPy",
27
28
  ]
28
29
  dependencies = ["tomli>=1.1.0 ; python_version<'3.11'"]
29
30
  dynamic = ["version"]
@@ -624,7 +624,14 @@ impl BuildContext {
624
624
  }
625
625
  }
626
626
  // FreeBSD
627
- (Os::FreeBsd, _)
627
+ | (Os::FreeBsd, _) => {
628
+ format!(
629
+ "{}_{}_{}",
630
+ target.target_os().to_string().to_ascii_lowercase(),
631
+ target.get_platform_release()?.to_ascii_lowercase(),
632
+ target.target_arch().machine(),
633
+ )
634
+ }
628
635
  // NetBSD
629
636
  | (Os::NetBsd, _)
630
637
  // OpenBSD
@@ -724,7 +731,7 @@ impl BuildContext {
724
731
  &self.out,
725
732
  &self.project_layout.project_root,
726
733
  &self.metadata24,
727
- &[tag.clone()],
734
+ std::slice::from_ref(&tag),
728
735
  self.excludes(Format::Wheel)?,
729
736
  self.compression,
730
737
  )?;
@@ -803,7 +810,7 @@ impl BuildContext {
803
810
  &self.out,
804
811
  &self.project_layout.project_root,
805
812
  &self.metadata24,
806
- &[tag.clone()],
813
+ std::slice::from_ref(&tag),
807
814
  self.excludes(Format::Wheel)?,
808
815
  self.compression,
809
816
  )?;
@@ -411,6 +411,11 @@ fn cargo_build_command(
411
411
  }
412
412
  }
413
413
 
414
+ // Set PYO3_BUILD_EXTENSION_MODULE when building pyo3 extension modules
415
+ if bridge_model.is_pyo3() && !bridge_model.is_bin() {
416
+ build_command.env("PYO3_BUILD_EXTENSION_MODULE", "1");
417
+ }
418
+
414
419
  // Setup `PYO3_CONFIG_FILE` if we are cross compiling for pyo3 bindings
415
420
  if let Some(interpreter) = python_interpreter {
416
421
  // Target python interpreter isn't runnable when cross compiling
@@ -243,7 +243,7 @@ pub struct WheelWriter {
243
243
  compression: CompressionOptions,
244
244
  }
245
245
  impl CompressionOptions {
246
- fn get_file_options(&self) -> zip::write::FileOptions<()> {
246
+ fn get_file_options(&self) -> zip::write::FileOptions<'_, ()> {
247
247
  let method = if cfg!(feature = "faster-tests") {
248
248
  // Unlike users which can use the develop subcommand, the tests have to go through
249
249
  // packing a zip which pip than has to unpack. This makes this 2-3 times faster
@@ -223,6 +223,13 @@ pub struct ToolMaturin {
223
223
  pub unstable_flags: Option<Vec<String>>,
224
224
  /// Additional rustc arguments
225
225
  pub rustc_args: Option<Vec<String>>,
226
+ /// Use base Python executable instead of venv Python executable in PEP 517 build.
227
+ //
228
+ // This can help avoid unnecessary rebuilds, as the Python executable does not change
229
+ // every time. It should not be set when the sdist build requires packages installed
230
+ // in venv.
231
+ #[serde(default)]
232
+ pub use_base_python: bool,
226
233
  }
227
234
 
228
235
  /// A pyproject.toml as specified in PEP 517
@@ -12,7 +12,21 @@ use std::io::{BufRead, BufReader};
12
12
  use std::path::Path;
13
13
 
14
14
  const PYPY_ABI_TAG: &str = "pp73";
15
- const GRAALPY_ABI_TAG: &str = "graalpy230_310_native";
15
+
16
+ fn graalpy_version_for_python_version(major: usize, minor: usize) -> Option<(usize, usize)> {
17
+ match (major, minor) {
18
+ (3, 10) => Some((24, 0)),
19
+ (3, 11) => Some((24, 2)),
20
+ // Since 25.0, GraalPy should only change the major release number for feature releases.
21
+ // Additionally, it promises that only the autumn (oddly-numbered) releases are
22
+ // allowed to break ABI compatibility, so only those can change the Python version.
23
+ // The even-numbered releases will report the ABI version of the previous release.
24
+ // So assuming that GraalPy doesn't fall terribly behind on updating Python version,
25
+ // the version used in the ABI should follow this formula
26
+ (3, 12..) => Some((25 + (minor - 12) * 2, 0)),
27
+ (_, _) => None,
28
+ }
29
+ }
16
30
 
17
31
  /// Some of the sysconfigdata of Python interpreter we care about
18
32
  #[derive(Debug, Clone, Deserialize, Eq, PartialEq)]
@@ -92,6 +106,20 @@ impl InterpreterConfig {
92
106
  gil_disabled,
93
107
  })
94
108
  }
109
+ (Os::Linux, GraalPy) => {
110
+ let (graalpy_major, graalpy_minor) =
111
+ graalpy_version_for_python_version(major, minor)?;
112
+ let ext_suffix = format!(".graalpy{graalpy_major}{graalpy_minor}-{major}{minor}-native-{python_ext_arch}-linux.so");
113
+ Some(Self {
114
+ major,
115
+ minor,
116
+ interpreter_kind: GraalPy,
117
+ abiflags: String::new(),
118
+ ext_suffix,
119
+ pointer_width: Some(target.pointer_width()),
120
+ gil_disabled,
121
+ })
122
+ }
95
123
  (Os::Macos, CPython) => {
96
124
  let abiflags = if python_version < (3, 8) {
97
125
  "m".to_string()
@@ -122,6 +150,20 @@ impl InterpreterConfig {
122
150
  gil_disabled,
123
151
  })
124
152
  }
153
+ (Os::Macos, GraalPy) => {
154
+ let (graalpy_major, graalpy_minor) =
155
+ graalpy_version_for_python_version(major, minor)?;
156
+ let ext_suffix = format!(".graalpy{graalpy_major}{graalpy_minor}-{major}{minor}-native-{python_ext_arch}-darwin.so");
157
+ Some(Self {
158
+ major,
159
+ minor,
160
+ interpreter_kind: GraalPy,
161
+ abiflags: String::new(),
162
+ ext_suffix,
163
+ pointer_width: Some(target.pointer_width()),
164
+ gil_disabled,
165
+ })
166
+ }
125
167
  (Os::Windows, CPython) => {
126
168
  let abiflags = if python_version < (3, 8) {
127
169
  "m".to_string()
@@ -319,7 +361,11 @@ impl InterpreterConfig {
319
361
  }
320
362
  }
321
363
  InterpreterKind::PyPy => abi_tag.unwrap_or_else(|| PYPY_ABI_TAG.to_string()),
322
- InterpreterKind::GraalPy => abi_tag.unwrap_or_else(|| GRAALPY_ABI_TAG.to_string()),
364
+ InterpreterKind::GraalPy => abi_tag.unwrap_or_else(|| {
365
+ let (graalpy_major, graalpy_minor) =
366
+ graalpy_version_for_python_version(major, minor).unwrap_or((23, 0));
367
+ format!("graalpy{graalpy_major}{graalpy_minor}_{major}{minor}_native")
368
+ }),
323
369
  };
324
370
  let file_ext = if target.is_windows() { "pyd" } else { "so" };
325
371
  let ext_suffix = if target.is_linux() || target.is_macos() || target.is_hurd() {
@@ -325,7 +325,7 @@ impl fmt::Display for InterpreterKind {
325
325
  match *self {
326
326
  InterpreterKind::CPython => write!(f, "CPython"),
327
327
  InterpreterKind::PyPy => write!(f, "PyPy"),
328
- InterpreterKind::GraalPy => write!(f, "GraalPy"),
328
+ InterpreterKind::GraalPy => write!(f, "GraalVM"),
329
329
  }
330
330
  }
331
331
  }
@@ -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] =
@@ -378,7 +378,7 @@ impl Target {
378
378
  Ok(release)
379
379
  }
380
380
 
381
- /// Returns the name python uses in `sys.platform` for this architecture.
381
+ /// Returns the name python uses in `platform.machine()` for this architecture.
382
382
  pub fn get_python_arch(&self) -> &str {
383
383
  match self.arch {
384
384
  Arch::Aarch64 => "aarch64",
@@ -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