maturin 1.8.0__tar.gz → 1.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of maturin might be problematic. Click here for more details.
- {maturin-1.8.0 → maturin-1.8.1}/Cargo.lock +1 -1
- {maturin-1.8.0 → maturin-1.8.1}/Cargo.toml +1 -1
- {maturin-1.8.0 → maturin-1.8.1}/Changelog.md +7 -1
- {maturin-1.8.0 → maturin-1.8.1}/PKG-INFO +1 -1
- {maturin-1.8.0 → maturin-1.8.1}/src/develop.rs +10 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/metadata.rs +10 -5
- {maturin-1.8.0 → maturin-1.8.1}/src/pyproject_toml.rs +80 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/target.rs +1 -1
- {maturin-1.8.0 → maturin-1.8.1}/.cirrus.yml +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/.codespellrc +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/.config/nextest.toml +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/.gitignore +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/.pre-commit-config.yaml +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/MANIFEST.in +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/README.md +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/clippy.toml +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/license-apache +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/license-mit +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/maturin/__init__.py +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/maturin/__main__.py +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/maturin.schema.json +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/netlify.toml +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/pyproject.toml +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/setup.py +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/audit.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/manylinux-policy.json +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/mod.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/musllinux-policy.json +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/musllinux.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/patchelf.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/platform_tag.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/policy.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/auditwheel/repair.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/bridge.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/build_context.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/build_options.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/cargo_toml.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/ci.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/compile.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/cross_compile.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/generate_json_schema.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/lib.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/main.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/module_writer.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/new_project.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/project_layout.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/python_interpreter/config.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/python_interpreter/get_interpreter_metadata.py +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/python_interpreter/mod.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/source_distribution.rs +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/.gitignore.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/Cargo.toml.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/__init__.py.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/build.rs.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/example.udl.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/lib.rs.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/main.rs.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/pyproject.toml.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/templates/test_all.py.j2 +0 -0
- {maturin-1.8.0 → maturin-1.8.1}/src/upload.rs +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
authors = ["konstin <konstin@mailbox.org>", "messense <messense@icloud.com>"]
|
|
3
3
|
name = "maturin"
|
|
4
|
-
version = "1.8.
|
|
4
|
+
version = "1.8.1"
|
|
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/**/*",
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.8.1]
|
|
4
|
+
|
|
5
|
+
* Downgrade invalid version info in `pyproject.toml` error to warning in [#2417](https://github.com/PyO3/maturin/pull/2417)
|
|
6
|
+
* Make `maturin develop` fail if version info is invalid in pyproject.toml in [#2418](https://github.com/PyO3/maturin/pull/2418)
|
|
7
|
+
|
|
3
8
|
## [1.8.0]
|
|
4
9
|
|
|
5
10
|
* Don't add wheel data to sdist in [#2367](https://github.com/PyO3/maturin/pull/2367)
|
|
@@ -1026,7 +1031,8 @@ points-0.1.0-py2.py3-none-manylinux1_x86_64.whl | 2,8M | 752K | 85K
|
|
|
1026
1031
|
|
|
1027
1032
|
* Initial Release
|
|
1028
1033
|
|
|
1029
|
-
[Unreleased]: https://github.com/pyo3/maturin/compare/v1.8.
|
|
1034
|
+
[Unreleased]: https://github.com/pyo3/maturin/compare/v1.8.1...HEAD
|
|
1035
|
+
[1.8.1]: https://github.com/pyo3/maturin/compare/v1.8.0...v1.8.1
|
|
1030
1036
|
[1.8.0]: https://github.com/pyo3/maturin/compare/v1.7.8...v1.8.0
|
|
1031
1037
|
[1.7.8]: https://github.com/pyo3/maturin/compare/v1.7.7...v1.7.8
|
|
1032
1038
|
[1.7.7]: https://github.com/pyo3/maturin/compare/v1.7.6...v1.7.7
|
|
@@ -403,6 +403,16 @@ pub fn develop(develop_options: DevelopOptions, venv_dir: &Path) -> Result<()> {
|
|
|
403
403
|
.editable(true)
|
|
404
404
|
.build()?;
|
|
405
405
|
|
|
406
|
+
// Ensure that version information is present, https://github.com/PyO3/maturin/issues/2416
|
|
407
|
+
if build_context
|
|
408
|
+
.pyproject_toml
|
|
409
|
+
.as_ref()
|
|
410
|
+
.is_some_and(|p| !p.warn_invalid_version_info())
|
|
411
|
+
{
|
|
412
|
+
bail!("Cannot build without valid version information. \
|
|
413
|
+
You need to specify either `project.version` or `project.dynamic = [\"version\"]` in pyproject.toml.");
|
|
414
|
+
}
|
|
415
|
+
|
|
406
416
|
let interpreter =
|
|
407
417
|
PythonInterpreter::check_executable(&python, &target, build_context.bridge())?.ok_or_else(
|
|
408
418
|
|| anyhow!("Expected `python` to be a python interpreter inside a virtualenv ಠ_ಠ"),
|
|
@@ -144,13 +144,18 @@ impl Metadata24 {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
self.name.clone_from(&project.name);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
|
|
148
|
+
let version_ok = pyproject_toml.warn_invalid_version_info();
|
|
149
|
+
if !version_ok {
|
|
150
|
+
// This is a hard error for maturin>=2.0, see https://github.com/PyO3/maturin/issues/2416.
|
|
151
|
+
let current_major = env!("CARGO_PKG_VERSION_MAJOR").parse::<usize>().unwrap();
|
|
152
|
+
if current_major > 1 {
|
|
153
|
+
bail!("Invalid version information in pyproject.toml.");
|
|
150
154
|
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if let Some(version) = &project.version {
|
|
151
158
|
self.version = version.clone();
|
|
152
|
-
} else if !dynamic.contains("version") {
|
|
153
|
-
bail!("`project.version` field is required in pyproject.toml unless it is present in the `project.dynamic` list");
|
|
154
159
|
}
|
|
155
160
|
|
|
156
161
|
if let Some(description) = &project.description {
|
|
@@ -426,6 +426,30 @@ impl PyProjectToml {
|
|
|
426
426
|
);
|
|
427
427
|
false
|
|
428
428
|
}
|
|
429
|
+
|
|
430
|
+
/// Having a pyproject.toml project table with neither `version` nor `dynamic = ['version']`
|
|
431
|
+
/// violates https://packaging.python.org/en/latest/specifications/pyproject-toml/#dynamic.
|
|
432
|
+
///
|
|
433
|
+
/// Returns true if version information is specified correctly or no project table is present.
|
|
434
|
+
pub fn warn_invalid_version_info(&self) -> bool {
|
|
435
|
+
let Some(project) = &self.project else {
|
|
436
|
+
return true;
|
|
437
|
+
};
|
|
438
|
+
let has_static_version = project.version.is_some();
|
|
439
|
+
let has_dynamic_version = project
|
|
440
|
+
.dynamic
|
|
441
|
+
.as_ref()
|
|
442
|
+
.is_some_and(|d| d.iter().any(|s| s == "version"));
|
|
443
|
+
if has_static_version && has_dynamic_version {
|
|
444
|
+
eprintln!("⚠️ Warning: `project.dynamic` must not specify `version` when `project.version` is present in pyproject.toml");
|
|
445
|
+
return false;
|
|
446
|
+
}
|
|
447
|
+
if !has_static_version && !has_dynamic_version {
|
|
448
|
+
eprintln!("⚠️ Warning: `project.version` field is required in pyproject.toml unless it is present in the `project.dynamic` list");
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
true
|
|
452
|
+
}
|
|
429
453
|
}
|
|
430
454
|
|
|
431
455
|
#[cfg(test)]
|
|
@@ -544,6 +568,62 @@ mod tests {
|
|
|
544
568
|
assert!(!without_constraint.warn_bad_maturin_version());
|
|
545
569
|
}
|
|
546
570
|
|
|
571
|
+
#[test]
|
|
572
|
+
fn test_warn_invalid_version_info_conflict() {
|
|
573
|
+
let conflict = toml::from_str::<PyProjectToml>(
|
|
574
|
+
r#"[build-system]
|
|
575
|
+
requires = ["maturin==1.0.0"]
|
|
576
|
+
|
|
577
|
+
[project]
|
|
578
|
+
name = "..."
|
|
579
|
+
version = "1.2.3"
|
|
580
|
+
dynamic = ['version']
|
|
581
|
+
"#,
|
|
582
|
+
)
|
|
583
|
+
.unwrap();
|
|
584
|
+
assert!(!conflict.warn_invalid_version_info());
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
#[test]
|
|
588
|
+
fn test_warn_invalid_version_info_missing() {
|
|
589
|
+
let missing = toml::from_str::<PyProjectToml>(
|
|
590
|
+
r#"[build-system]
|
|
591
|
+
requires = ["maturin==1.0.0"]
|
|
592
|
+
|
|
593
|
+
[project]
|
|
594
|
+
name = "..."
|
|
595
|
+
"#,
|
|
596
|
+
)
|
|
597
|
+
.unwrap();
|
|
598
|
+
assert!(!missing.warn_invalid_version_info());
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
#[test]
|
|
602
|
+
fn test_warn_invalid_version_info_ok() {
|
|
603
|
+
let static_ver = toml::from_str::<PyProjectToml>(
|
|
604
|
+
r#"[build-system]
|
|
605
|
+
requires = ["maturin==1.0.0"]
|
|
606
|
+
|
|
607
|
+
[project]
|
|
608
|
+
name = "..."
|
|
609
|
+
version = "1.2.3"
|
|
610
|
+
"#,
|
|
611
|
+
)
|
|
612
|
+
.unwrap();
|
|
613
|
+
assert!(static_ver.warn_invalid_version_info());
|
|
614
|
+
let dynamic_ver = toml::from_str::<PyProjectToml>(
|
|
615
|
+
r#"[build-system]
|
|
616
|
+
requires = ["maturin==1.0.0"]
|
|
617
|
+
|
|
618
|
+
[project]
|
|
619
|
+
name = "..."
|
|
620
|
+
dynamic = ['version']
|
|
621
|
+
"#,
|
|
622
|
+
)
|
|
623
|
+
.unwrap();
|
|
624
|
+
assert!(dynamic_ver.warn_invalid_version_info());
|
|
625
|
+
}
|
|
626
|
+
|
|
547
627
|
#[test]
|
|
548
628
|
fn deserialize_include_exclude() {
|
|
549
629
|
let single = r#"include = ["single"]"#;
|
|
@@ -463,11 +463,11 @@ impl Target {
|
|
|
463
463
|
PlatformTag::manylinux2010()
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
+
Arch::Riscv64 => PlatformTag::Manylinux { x: 2, y: 31 },
|
|
466
467
|
Arch::Armv5teL
|
|
467
468
|
| Arch::Armv6L
|
|
468
469
|
| Arch::Wasm32
|
|
469
470
|
| Arch::Riscv32
|
|
470
|
-
| Arch::Riscv64
|
|
471
471
|
| Arch::Mips64el
|
|
472
472
|
| Arch::Mips64
|
|
473
473
|
| Arch::Mipsel
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|