From e592c12f0cde3330f9fb7db9762f600e981349bf Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 13 Feb 2023 15:27:38 +0800 Subject: [PATCH 01/10] Enable `extension-module` feature in `pyproject.toml` in project templates --- guide/src/tutorial.md | 38 ++++++++++++++++++++++----------- src/templates/Cargo.toml.j2 | 4 ++-- src/templates/pyproject.toml.j2 | 7 +++++- 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/guide/src/tutorial.md b/guide/src/tutorial.md index 87bfa517c..db3c673a1 100644 --- a/guide/src/tutorial.md +++ b/guide/src/tutorial.md @@ -37,9 +37,21 @@ rand = "0.8.4" [dependencies.pyo3] version = "0.18.0" -# "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so) # "abi3-py37" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.7 -features = ["extension-module", "abi3-py37"] +features = ["abi3-py37"] +``` + +Add a `pyproject.toml` to configure [PEP 518](https://peps.python.org/pep-0518/) build system requirements +and enable the `extension-module` feature of pyo3. + +```toml +[build-system] +requires = ["maturin>=0.14,<0.15"] +build-backend = "maturin" + +[tool.maturin] +# "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so) +features = ["pyo3/extension-module"] ``` ### Use `maturin new` @@ -47,20 +59,20 @@ features = ["extension-module", "abi3-py37"] New projects can also be quickly created using the `maturin new` command: ```bash -USAGE: - maturin new [FLAGS] [OPTIONS] +maturin new --help +Create a new cargo project -FLAGS: - -h, --help Prints help information - --mixed Use mixed Rust/Python project layout - -V, --version Prints version information +Usage: maturin new [OPTIONS] -OPTIONS: - -b, --bindings Which kind of bindings to use [possible values: pyo3, rust-cpython, cffi, bin] - --name Set the resulting package name, defaults to the directory name +Arguments: + Project path -ARGS: - Project path +Options: + --name Set the resulting package name, defaults to the directory name + --mixed Use mixed Rust/Python project layout + --src Use Python first src layout for mixed Rust/Python project + -b, --bindings Which kind of bindings to use [possible values: pyo3, rust-cpython, cffi, uniffi, bin] + -h, --help Print help information ``` The above process can be achieved by running `maturin new -b pyo3 guessing_game` diff --git a/src/templates/Cargo.toml.j2 b/src/templates/Cargo.toml.j2 index 69c8a1e4c..10366a949 100644 --- a/src/templates/Cargo.toml.j2 +++ b/src/templates/Cargo.toml.j2 @@ -12,9 +12,9 @@ crate-type = ["cdylib"] [dependencies] {% if bindings == "pyo3" -%} -pyo3 = { version = "0.18.0", features = ["extension-module"] } +pyo3 = "0.18.1" {% elif bindings == "rust-cpython" -%} -cpython = { version = "0.7.1", features = ["extension-module"] } +cpython = "0.7.1" {% elif bindings == "uniffi" -%} uniffi = "0.21.0" uniffi_macros = "0.21.0" diff --git a/src/templates/pyproject.toml.j2 b/src/templates/pyproject.toml.j2 index cec6cf203..412cb537e 100644 --- a/src/templates/pyproject.toml.j2 +++ b/src/templates/pyproject.toml.j2 @@ -14,7 +14,7 @@ classifiers = [ dependencies = ["cffi"] {%- endif %} -{% if bindings == "cffi" or bindings == "bin" or mixed_non_src -%} +{% if bindings in ["bin", "cffi", "pyo3", "rust-cpython"] or mixed_non_src -%} [tool.maturin] {% if bindings == "cffi" or bindings == "bin" -%} bindings = "{{ bindings }}" @@ -22,4 +22,9 @@ bindings = "{{ bindings }}" {% if mixed_non_src -%} python-source = "python" {% endif -%} +{% if bindings == "pyo3" -%} +features = ["pyo3/extension-module"] +{% elif bindings == "rust-cpython" -%} +features = ["cpython/extension-module"] +{% endif -%} {% endif -%} From 0bc3ace619ed93af0f42510830de370636380f1c Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 15 Feb 2023 12:51:42 +0800 Subject: [PATCH 02/10] Add support for Emscripten in `generate-ci` command --- Changelog.md | 2 + src/ci.rs | 129 +++++++++++++++++++++++++++++++---- tests/cmd/generate-ci.stdout | 10 +-- 3 files changed, 124 insertions(+), 17 deletions(-) diff --git a/Changelog.md b/Changelog.md index 4618e9747..590e5f6ae 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +* Add support for Emscripten in `generate-ci` command in [#1484](https://github.com/PyO3/maturin/pull/1484) + ## [0.14.13] - 2023-02-12 * `maturin develop` now looks for a virtualenv `.venv` in the current or any parent directory if no virtual environment is active. diff --git a/src/ci.rs b/src/ci.rs index 963103c06..9ad4df1be 100644 --- a/src/ci.rs +++ b/src/ci.rs @@ -1,3 +1,4 @@ +use std::collections::BTreeSet; use std::fmt; use std::path::{Path, PathBuf}; @@ -18,23 +19,44 @@ pub enum Provider { } /// Platform -#[derive(Debug, Clone, Copy, ValueEnum)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, ValueEnum)] #[clap(rename_all = "lower")] pub enum Platform { + /// All + All, /// Linux Linux, /// Windows Windows, /// macOS Macos, + /// Emscripten + Emscripten, +} + +impl Platform { + fn defaults() -> Vec { + vec![Platform::Linux, Platform::Windows, Platform::Macos] + } + + fn all() -> Vec { + vec![ + Platform::Linux, + Platform::Windows, + Platform::Macos, + Platform::Emscripten, + ] + } } impl fmt::Display for Platform { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { + Platform::All => write!(f, "all"), Platform::Linux => write!(f, "linux"), Platform::Windows => write!(f, "windows"), Platform::Macos => write!(f, "macos"), + Platform::Emscripten => write!(f, "emscripten"), } } } @@ -56,7 +78,7 @@ pub struct GenerateCI { id = "platform", long, action = ArgAction::Append, - num_args = 0.., + num_args = 1.., default_values_t = vec![Platform::Linux, Platform::Windows, Platform::Macos], )] pub platforms: Vec, @@ -139,10 +161,28 @@ jobs:\n" .to_string(); let mut needs = Vec::new(); - for platform in &self.platforms { + let platforms: BTreeSet<_> = self + .platforms + .iter() + .flat_map(|p| { + if matches!(p, Platform::All) { + if !bridge_model.is_bin() { + Platform::all() + } else { + Platform::defaults() + } + } else { + vec![*p] + } + }) + .collect(); + for platform in &platforms { + if bridge_model.is_bin() && matches!(platform, Platform::Emscripten) { + continue; + } let plat_name = platform.to_string(); let os_name = match platform { - Platform::Linux => "ubuntu", + Platform::Linux | Platform::Emscripten => "ubuntu", _ => &plat_name, }; needs.push(platform.to_string()); @@ -155,13 +195,16 @@ jobs:\n" Platform::Linux => vec!["x86_64", "x86", "aarch64", "armv7", "s390x", "ppc64le"], Platform::Windows => vec!["x64", "x86"], Platform::Macos => vec!["x86_64", "aarch64"], + _ => Vec::new(), }; - conf.push_str(&format!( - " strategy: + if !targets.is_empty() { + conf.push_str(&format!( + " strategy: matrix: target: [{targets}]\n", - targets = targets.join(", ") - )); + targets = targets.join(", ") + )); + } // job steps conf.push_str( " steps: @@ -178,9 +221,24 @@ jobs:\n" conf.push_str(" architecture: ${{ matrix.target }}\n"); } } + + // install pyodide-build for emscripten + if matches!(platform, Platform::Emscripten) { + conf.push_str(" - run: pip install pyodide-build\n"); + conf.push_str(" - shell: bash\n run: echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV\n"); + conf.push_str( + " - uses: mymindstorm/setup-emsdk@v11 + with: + version: ${{ env.EMSCRIPTEN_VERSION }} + actions-cache-folder: emsdk-cache\n", + ); + } + // build wheels let mut maturin_args = if is_abi3 || (is_bin && !setup_python) { Vec::new() + } else if matches!(platform, Platform::Emscripten) { + vec!["-i".to_string(), "3.10".to_string()] } else { vec!["--find-interpreter".to_string()] }; @@ -198,26 +256,38 @@ jobs:\n" } else { format!(" {}", maturin_args.join(" ")) }; + let maturin_target = if matches!(platform, Platform::Emscripten) { + "wasm32-unknown-emscripten" + } else { + "${{ matrix.target }}" + }; conf.push_str(&format!( " - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{{{ matrix.target }}}} + target: {maturin_target} args: --release --out dist{maturin_args} " )); if matches!(platform, Platform::Linux) { conf.push_str(" manylinux: auto\n"); + } else if matches!(platform, Platform::Emscripten) { + conf.push_str(" rust-toolchain: nightly\n"); } // upload wheels - conf.push_str( + let artifact_name = if matches!(platform, Platform::Emscripten) { + "wasm-wheels" + } else { + "wheels" + }; + conf.push_str(&format!( " - name: Upload wheels uses: actions/upload-artifact@v3 with: - name: wheels + name: {artifact_name} path: dist -", - ); +" + )); // pytest let mut chdir = String::new(); if let Some(manifest_path) = self.manifest_path.as_ref() { @@ -257,6 +327,24 @@ jobs:\n" set -e pip3 install {project_name} --find-links dist --force-reinstall {chdir}pytest +" + )); + } else if matches!(platform, Platform::Emscripten) { + conf.push_str( + " - uses: actions/setup-node@v3 + with: + node-version: '18' +", + ); + conf.push_str(&format!( + " - name: pytest + run: | + set -e + pyodide venv .venv + source .venv/bin/activate + pip install {project_name} --find-links dist --force-reinstall + pip install pytest + {chdir} python -m pytest " )); } else { @@ -297,6 +385,21 @@ jobs:\n" "#, needs = needs.join(", ") )); + if platforms.contains(&Platform::Emscripten) { + conf.push_str( + " - uses: actions/download-artifact@v3 + with: + name: wasm-wheels + path: wasm + - name: Upload to GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: | + wasm/*.whl + prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }} +", + ); + } Ok(conf) } diff --git a/tests/cmd/generate-ci.stdout b/tests/cmd/generate-ci.stdout index af8a8bf69..33258e05f 100644 --- a/tests/cmd/generate-ci.stdout +++ b/tests/cmd/generate-ci.stdout @@ -18,15 +18,17 @@ Options: [default: -] - --platform [...] + --platform ... Platform support [default: linux windows macos] Possible values: - - linux: Linux - - windows: Windows - - macos: macOS + - all: All + - linux: Linux + - windows: Windows + - macos: macOS + - emscripten: Emscripten --pytest Enable pytest From e07017d4851553b54e78afbd2d6205bc8f846c6b Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 15 Feb 2023 15:46:13 +0800 Subject: [PATCH 03/10] Use mymindstorm/setup-emsdk@v12 --- src/ci.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ci.rs b/src/ci.rs index 9ad4df1be..294c9f3d8 100644 --- a/src/ci.rs +++ b/src/ci.rs @@ -227,7 +227,7 @@ jobs:\n" conf.push_str(" - run: pip install pyodide-build\n"); conf.push_str(" - shell: bash\n run: echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV\n"); conf.push_str( - " - uses: mymindstorm/setup-emsdk@v11 + " - uses: mymindstorm/setup-emsdk@v12 with: version: ${{ env.EMSCRIPTEN_VERSION }} actions-cache-folder: emsdk-cache\n", From 286b2e7430ebaa2055f05f51c1587c210412c3c8 Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 15 Feb 2023 16:17:17 +0800 Subject: [PATCH 04/10] Add a maturin version comment to generated CI configuration --- src/ci.rs | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/ci.rs b/src/ci.rs index 294c9f3d8..d4ec73066 100644 --- a/src/ci.rs +++ b/src/ci.rs @@ -149,7 +149,9 @@ impl GenerateCI { | BridgeModel::Cffi | BridgeModel::UniFfi ); - let mut conf = "on: + let mut conf = format!( + "# Generated by maturin v{version} +on: push: branches: - main @@ -157,8 +159,9 @@ impl GenerateCI { pull_request: workflow_dispatch: -jobs:\n" - .to_string(); +jobs:\n", + version = env!("CARGO_PKG_VERSION"), + ); let mut needs = Vec::new(); let platforms: BTreeSet<_> = self @@ -424,7 +427,11 @@ mod tests { fn test_generate_github() { let conf = GenerateCI::default() .generate_github("example", &BridgeModel::Bindings("pyo3".to_string(), 7)) - .unwrap(); + .unwrap() + .lines() + .skip(1) + .collect::>() + .join("\n"); let expected = indoc! {r#" on: push: @@ -517,14 +524,18 @@ mod tests { command: upload args: --skip-existing * "#}; - assert_eq!(conf, expected); + assert_eq!(conf, expected.trim()); } #[test] fn test_generate_github_abi3() { let conf = GenerateCI::default() .generate_github("example", &BridgeModel::BindingsAbi3(3, 7)) - .unwrap(); + .unwrap() + .lines() + .skip(1) + .collect::>() + .join("\n"); let expected = indoc! {r#" on: push: @@ -617,7 +628,7 @@ mod tests { command: upload args: --skip-existing * "#}; - assert_eq!(conf, expected); + assert_eq!(conf, expected.trim()); } #[test] @@ -629,7 +640,11 @@ mod tests { }; let conf = gen .generate_github("example", &BridgeModel::Bindings("pyo3".to_string(), 7)) - .unwrap(); + .unwrap() + .lines() + .skip(1) + .collect::>() + .join("\n"); let expected = indoc! {r#" on: push: @@ -761,14 +776,18 @@ mod tests { command: upload args: --skip-existing * "#}; - assert_eq!(conf, expected); + assert_eq!(conf, expected.trim()); } #[test] fn test_generate_github_bin_no_binding() { let conf = GenerateCI::default() .generate_github("example", &BridgeModel::Bin(None)) - .unwrap(); + .unwrap() + .lines() + .skip(1) + .collect::>() + .join("\n"); let expected = indoc! {r#" on: push: @@ -851,6 +870,6 @@ mod tests { command: upload args: --skip-existing * "#}; - assert_eq!(conf, expected); + assert_eq!(conf, expected.trim()); } } From 5b67252fd85ac494eb9593cbca2712750b930d79 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 14 Feb 2023 17:41:28 +0800 Subject: [PATCH 05/10] refactor: split feature-gated http agent into smaller functions --- src/upload.rs | 60 ++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/upload.rs b/src/upload.rs index a61f02e84..f3a8d1d06 100644 --- a/src/upload.rs +++ b/src/upload.rs @@ -259,6 +259,38 @@ fn canonicalize_name(name: &str) -> String { .to_lowercase() } +fn http_proxy() -> Result { + env::var("HTTPS_PROXY") + .or_else(|_| env::var("https_proxy")) + .or_else(|_| env::var("HTTP_PROXY")) + .or_else(|_| env::var("http_proxy")) +} + +#[cfg(feature = "native-tls")] +#[allow(clippy::result_large_err)] +fn http_agent() -> Result { + use std::sync::Arc; + + let mut builder = + ureq::builder().tls_connector(Arc::new(native_tls_crate::TlsConnector::new()?)); + if let Ok(proxy) = http_proxy() { + let proxy = ureq::Proxy::new(proxy)?; + builder = builder.proxy(proxy); + }; + Ok(builder.build()) +} + +#[cfg(not(feature = "native-tls"))] +#[allow(clippy::result_large_err)] +fn http_agent() -> Result { + let mut builder = ureq::builder(); + if let Ok(proxy) = http_proxy() { + let proxy = ureq::Proxy::new(proxy)?; + builder = builder.proxy(proxy); + }; + Ok(builder.build()) +} + /// Uploads a single wheel to the registry #[allow(clippy::result_large_err)] pub fn upload(registry: &Registry, wheel_path: &Path) -> Result<(), UploadError> { @@ -336,35 +368,9 @@ pub fn upload(registry: &Registry, wheel_path: &Path) -> Result<(), UploadError> form.add_stream("content", &wheel, Some(wheel_name), None); let multipart_data = form.prepare().map_err(|e| e.error)?; - let encoded = base64::encode(format!("{}:{}", registry.username, registry.password)); - let http_proxy = env::var("HTTPS_PROXY") - .or_else(|_| env::var("https_proxy")) - .or_else(|_| env::var("HTTP_PROXY")) - .or_else(|_| env::var("http_proxy")); - - #[cfg(not(feature = "native-tls"))] - let agent = { - let mut builder = ureq::builder(); - if let Ok(proxy) = http_proxy { - let proxy = ureq::Proxy::new(proxy)?; - builder = builder.proxy(proxy); - }; - builder.build() - }; - - #[cfg(feature = "native-tls")] - let agent = { - use std::sync::Arc; - let mut builder = - ureq::builder().tls_connector(Arc::new(native_tls_crate::TlsConnector::new()?)); - if let Ok(proxy) = http_proxy { - let proxy = ureq::Proxy::new(proxy)?; - builder = builder.proxy(proxy); - }; - builder.build() - }; + let agent = http_agent()?; let response = agent .post(registry.url.as_str()) From b915ff5d9936e71593e98d98d2948c5346114549 Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 15 Feb 2023 19:45:45 +0800 Subject: [PATCH 06/10] Add support for linking with pyo3 in abi3 debug mode on Windows --- Changelog.md | 1 + src/build_context.rs | 4 +++- src/build_options.rs | 5 +++++ src/module_writer.rs | 22 ++++++++++++------- src/python_interpreter/mod.rs | 5 +++++ .../pyo3-abi3-without-version/Cargo.lock | 20 ++++++++--------- test-crates/pyo3-bin/Cargo.lock | 20 ++++++++--------- test-crates/pyo3-feature/Cargo.lock | 20 ++++++++--------- test-crates/pyo3-ffi-pure/Cargo.lock | 8 +++---- test-crates/pyo3-ffi-pure/Cargo.toml | 2 +- .../pyo3-mixed-include-exclude/Cargo.lock | 20 ++++++++--------- test-crates/pyo3-mixed-py-subdir/Cargo.lock | 20 ++++++++--------- test-crates/pyo3-mixed-src/rust/Cargo.lock | 20 ++++++++--------- test-crates/pyo3-mixed-submodule/Cargo.lock | 20 ++++++++--------- test-crates/pyo3-mixed/Cargo.lock | 20 ++++++++--------- .../pyo3-no-extension-module/Cargo.lock | 16 +++++++------- test-crates/pyo3-pure/Cargo.lock | 20 ++++++++--------- test-crates/sdist_with_path_dep/Cargo.lock | 12 +++++----- test-crates/workspace-inheritance/Cargo.lock | 20 ++++++++--------- .../workspace_with_path_dep/Cargo.lock | 20 ++++++++--------- 20 files changed, 157 insertions(+), 138 deletions(-) diff --git a/Changelog.md b/Changelog.md index 590e5f6ae..91fa5f4b0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] * Add support for Emscripten in `generate-ci` command in [#1484](https://github.com/PyO3/maturin/pull/1484) +* Add support for linking with pyo3 in abi3 debug mode on Windows in [#1487](https://github.com/PyO3/maturin/pull/1487) ## [0.14.13] - 2023-02-12 diff --git a/src/build_context.rs b/src/build_context.rs index 9746b6c17..f2e8e8221 100644 --- a/src/build_context.rs +++ b/src/build_context.rs @@ -526,7 +526,8 @@ impl BuildContext { &self.project_layout, &self.module_name, &artifact.path, - None, + self.interpreter.first(), + true, &self.target, self.editable, self.pyproject_toml.as_ref(), @@ -605,6 +606,7 @@ impl BuildContext { &self.module_name, &artifact.path, Some(python_interpreter), + false, &self.target, self.editable, self.pyproject_toml.as_ref(), diff --git a/src/build_options.rs b/src/build_options.rs index b7848f04e..0f1ea3596 100644 --- a/src/build_options.rs +++ b/src/build_options.rs @@ -369,6 +369,11 @@ impl BuildOptions { implmentation_name: "cpython".to_string(), soabi: None, }]) + } else if let Some(config_file) = env::var_os("PYO3_CONFIG_FILE") { + let interpreter_config = + InterpreterConfig::from_pyo3_config(config_file.as_ref(), target) + .context("Invalid PYO3_CONFIG_FILE")?; + Ok(vec![PythonInterpreter::from_config(interpreter_config)]) } else if let Some(interp) = interpreters.get(0) { println!("🐍 Using {interp} to generate to link bindings (With abi3, an interpreter is only required on windows)"); Ok(interpreters) diff --git a/src/module_writer.rs b/src/module_writer.rs index 9bae13df5..33b00e588 100644 --- a/src/module_writer.rs +++ b/src/module_writer.rs @@ -712,22 +712,28 @@ pub fn write_bindings_module( module_name: &str, artifact: &Path, python_interpreter: Option<&PythonInterpreter>, + is_abi3: bool, target: &Target, editable: bool, pyproject_toml: Option<&PyProjectToml>, ) -> Result<()> { let ext_name = &project_layout.extension_name; - let so_filename = match python_interpreter { - Some(python_interpreter) => python_interpreter.get_library_name(ext_name), - // abi3 - None => { - if target.is_unix() { - format!("{ext_name}.abi3.so") - } else { + let so_filename = if is_abi3 { + if target.is_unix() { + format!("{ext_name}.abi3.so") + } else { + match python_interpreter { + Some(python_interpreter) if python_interpreter.is_windows_debug() => { + format!("{ext_name}_d.pyd") + } // Apparently there is no tag for abi3 on windows - format!("{ext_name}.pyd") + _ => format!("{ext_name}.pyd"), } } + } else { + let python_interpreter = + python_interpreter.expect("A python interpreter is required for non-abi3 build"); + python_interpreter.get_library_name(ext_name) }; if !editable { diff --git a/src/python_interpreter/mod.rs b/src/python_interpreter/mod.rs index 1c0e0f80e..334578257 100644 --- a/src/python_interpreter/mod.rs +++ b/src/python_interpreter/mod.rs @@ -539,6 +539,11 @@ impl PythonInterpreter { ) } + /// Is this a debug build of Python for Windows? + pub fn is_windows_debug(&self) -> bool { + self.ext_suffix.starts_with("_d.") && self.ext_suffix.ends_with(".pyd") + } + /// Checks whether the given command is a python interpreter and returns a /// [PythonInterpreter] if that is the case pub fn check_executable( diff --git a/test-crates/pyo3-abi3-without-version/Cargo.lock b/test-crates/pyo3-abi3-without-version/Cargo.lock index 250eb49ab..f8e0ed464 100644 --- a/test-crates/pyo3-abi3-without-version/Cargo.lock +++ b/test-crates/pyo3-abi3-without-version/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -115,9 +115,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/pyo3-bin/Cargo.lock b/test-crates/pyo3-bin/Cargo.lock index d61c11cfb..4f703ddff 100644 --- a/test-crates/pyo3-bin/Cargo.lock +++ b/test-crates/pyo3-bin/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -115,9 +115,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/pyo3-feature/Cargo.lock b/test-crates/pyo3-feature/Cargo.lock index e8644f56a..d4ed6de70 100644 --- a/test-crates/pyo3-feature/Cargo.lock +++ b/test-crates/pyo3-feature/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -108,9 +108,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/pyo3-ffi-pure/Cargo.lock b/test-crates/pyo3-ffi-pure/Cargo.lock index b2edc3d3b..ec3e64463 100644 --- a/test-crates/pyo3-ffi-pure/Cargo.lock +++ b/test-crates/pyo3-ffi-pure/Cargo.lock @@ -16,9 +16,9 @@ checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" [[package]] name = "pyo3-build-config" -version = "0.17.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -26,9 +26,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.17.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", diff --git a/test-crates/pyo3-ffi-pure/Cargo.toml b/test-crates/pyo3-ffi-pure/Cargo.toml index d378e200d..cc35d7eda 100644 --- a/test-crates/pyo3-ffi-pure/Cargo.toml +++ b/test-crates/pyo3-ffi-pure/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.0" edition = "2021" [dependencies] -pyo3-ffi = { version = "0.17.3", features = ["abi3-py37", "extension-module"] } +pyo3-ffi = { version = "0.18.1", features = ["abi3-py37", "extension-module"] } [lib] name = "pyo3_ffi_pure" diff --git a/test-crates/pyo3-mixed-include-exclude/Cargo.lock b/test-crates/pyo3-mixed-include-exclude/Cargo.lock index 0e92c42e2..679ebd19d 100644 --- a/test-crates/pyo3-mixed-include-exclude/Cargo.lock +++ b/test-crates/pyo3-mixed-include-exclude/Cargo.lock @@ -97,9 +97,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -114,9 +114,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "python3-dll-a", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/pyo3-mixed-py-subdir/Cargo.lock b/test-crates/pyo3-mixed-py-subdir/Cargo.lock index bde726a1f..cd4d7c3ce 100644 --- a/test-crates/pyo3-mixed-py-subdir/Cargo.lock +++ b/test-crates/pyo3-mixed-py-subdir/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -108,9 +108,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/pyo3-mixed-src/rust/Cargo.lock b/test-crates/pyo3-mixed-src/rust/Cargo.lock index 9d91be84e..93ce6f7e6 100644 --- a/test-crates/pyo3-mixed-src/rust/Cargo.lock +++ b/test-crates/pyo3-mixed-src/rust/Cargo.lock @@ -97,9 +97,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -114,9 +114,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "python3-dll-a", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/pyo3-mixed-submodule/Cargo.lock b/test-crates/pyo3-mixed-submodule/Cargo.lock index 468495420..35cd5ec63 100644 --- a/test-crates/pyo3-mixed-submodule/Cargo.lock +++ b/test-crates/pyo3-mixed-submodule/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -108,9 +108,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/pyo3-mixed/Cargo.lock b/test-crates/pyo3-mixed/Cargo.lock index 76a685579..2b5742d76 100644 --- a/test-crates/pyo3-mixed/Cargo.lock +++ b/test-crates/pyo3-mixed/Cargo.lock @@ -97,9 +97,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -114,9 +114,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "python3-dll-a", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/pyo3-no-extension-module/Cargo.lock b/test-crates/pyo3-no-extension-module/Cargo.lock index 3bc1623ce..7fb62b468 100644 --- a/test-crates/pyo3-no-extension-module/Cargo.lock +++ b/test-crates/pyo3-no-extension-module/Cargo.lock @@ -38,9 +38,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.17.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "libc", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.17.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.17.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", diff --git a/test-crates/pyo3-pure/Cargo.lock b/test-crates/pyo3-pure/Cargo.lock index e1c67ddd9..1775fba98 100644 --- a/test-crates/pyo3-pure/Cargo.lock +++ b/test-crates/pyo3-pure/Cargo.lock @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "python3-dll-a", @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -151,9 +151,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/sdist_with_path_dep/Cargo.lock b/test-crates/sdist_with_path_dep/Cargo.lock index 735aec7d8..d7a0b7fbf 100644 --- a/test-crates/sdist_with_path_dep/Cargo.lock +++ b/test-crates/sdist_with_path_dep/Cargo.lock @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "libc", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", diff --git a/test-crates/workspace-inheritance/Cargo.lock b/test-crates/workspace-inheritance/Cargo.lock index 2074244bd..040801ae9 100644 --- a/test-crates/workspace-inheritance/Cargo.lock +++ b/test-crates/workspace-inheritance/Cargo.lock @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -149,9 +149,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -161,9 +161,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", diff --git a/test-crates/workspace_with_path_dep/Cargo.lock b/test-crates/workspace_with_path_dep/Cargo.lock index 50fbf80e4..790598610 100644 --- a/test-crates/workspace_with_path_dep/Cargo.lock +++ b/test-crates/workspace_with_path_dep/Cargo.lock @@ -102,9 +102,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4149c8c3975099622b4e1962dac27565cf5663b76452c3e2b66e0b6824277" +checksum = "06a3d8e8a46ab2738109347433cb7b96dffda2e4a218b03ef27090238886b147" dependencies = [ "cfg-if", "indoc", @@ -119,9 +119,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd09fe469834db21ee60e0051030339e5d361293d8cb5ec02facf7fdcf52dbf" +checksum = "75439f995d07ddfad42b192dfcf3bc66a7ecfd8b4a1f5f6f046aa5c2c5d7677d" dependencies = [ "once_cell", "target-lexicon", @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427c9a96b9c5b12156dbc11f76b14f49e9aae8905ca783ea87c249044ef137" +checksum = "839526a5c07a17ff44823679b68add4a58004de00512a95b6c1c98a6dcac0ee5" dependencies = [ "libc", "pyo3-build-config", @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b822bbba9d60630a44d2109bc410489bb2f439b33e3a14ddeb8a40b378a7c4" +checksum = "bd44cf207476c6a9760c4653559be4f206efafb924d3e4cbf2721475fc0d6cc5" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -151,9 +151,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ae898104f7c99db06231160770f3e40dad6eb9021daddc0fedfa3e41dff10a" +checksum = "dc1f43d8e30460f36350d18631ccf85ded64c059829208fe680904c65bcd0a4c" dependencies = [ "proc-macro2", "quote", From 3adc66cd77c569e901ecd8edad71b20d69f567d0 Mon Sep 17 00:00:00 2001 From: messense Date: Fri, 17 Feb 2023 12:18:32 +0800 Subject: [PATCH 07/10] refactor: Add `emscripten_verison` function --- src/target.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/target.rs b/src/target.rs index e17c730da..c374f438c 100644 --- a/src/target.rs +++ b/src/target.rs @@ -330,12 +330,7 @@ impl Target { } // Emscripten (Os::Emscripten, Arch::Wasm32) => { - let os_version = env::var("MATURIN_EMSCRIPTEN_VERSION"); - let release = match os_version { - Ok(os_ver) => os_ver, - Err(_) => emcc_version()?, - }; - let release = release.replace(['.', '-'], "_"); + let release = emscripten_version()?.replace(['.', '-'], "_"); format!("emscripten_{release}_wasm32") } (Os::Wasi, Arch::Wasm32) => { @@ -783,6 +778,16 @@ pub(crate) fn rustc_macosx_target_version(target: &str) -> (u16, u16) { rustc_target_version().unwrap_or(fallback_version) } +/// Emscripten version +fn emscripten_version() -> Result { + let os_version = env::var("MATURIN_EMSCRIPTEN_VERSION"); + let release = match os_version { + Ok(os_ver) => os_ver, + Err(_) => emcc_version()?, + }; + Ok(release) +} + fn emcc_version() -> Result { use regex::bytes::Regex; use std::process::Command; From 88c4d85ba5885a6db6f1558140b7342ddbbd4425 Mon Sep 17 00:00:00 2001 From: messense Date: Fri, 17 Feb 2023 12:21:05 +0800 Subject: [PATCH 08/10] Use default `ext_suffix` for Emscripten target if not provided in `PYO3_CONFIG_FILE` --- Changelog.md | 1 + src/python_interpreter/config.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Changelog.md b/Changelog.md index 91fa5f4b0..789a45baa 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Add support for Emscripten in `generate-ci` command in [#1484](https://github.com/PyO3/maturin/pull/1484) * Add support for linking with pyo3 in abi3 debug mode on Windows in [#1487](https://github.com/PyO3/maturin/pull/1487) +* Use default `ext_suffix` for Emscripten target if not provided in `PYO3_CONFIG_FILE` in [#1491](https://github.com/PyO3/maturin/pull/1491) ## [0.14.13] - 2023-02-12 diff --git a/src/python_interpreter/config.rs b/src/python_interpreter/config.rs index 4473f7e8e..feec2848a 100644 --- a/src/python_interpreter/config.rs +++ b/src/python_interpreter/config.rs @@ -198,6 +198,16 @@ impl InterpreterConfig { ) }), } + } else if target.is_emscripten() && matches!(interpreter_kind, InterpreterKind::CPython) { + ext_suffix.unwrap_or_else(|| { + format!( + ".cpython-{}-{}-{}.{}", + abi_tag, + target.get_python_arch(), + target.get_python_os(), + file_ext + ) + }) } else { ext_suffix.context("missing value for ext_suffix")? }; From 72f3617e6c3b90b0bf316d44836593ce14d83a86 Mon Sep 17 00:00:00 2001 From: messense Date: Sat, 18 Feb 2023 16:12:37 +0800 Subject: [PATCH 09/10] Deprecate `package.metadata.maturin.data` Use `[tool.maturin.data]` in pyproject.toml instead --- src/project_layout.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/project_layout.rs b/src/project_layout.rs index 79b9e5f84..e12657d49 100644 --- a/src/project_layout.rs +++ b/src/project_layout.rs @@ -183,6 +183,7 @@ impl ProjectResolver { } } None => extra_metadata.data.as_ref().map(|data| { + eprintln!("⚠️ Warning: specify `data` in Cargo.toml is deprecated, use `data` in [tool.maturin] section in pyproject.toml instead"); let data = Path::new(data); if data.is_absolute() { data.to_path_buf() From de265a82252a0e8e5d72bf552daa5cd060b847dc Mon Sep 17 00:00:00 2001 From: messense Date: Fri, 24 Feb 2023 12:02:40 +0800 Subject: [PATCH 10/10] Release v0.14.14 --- Cargo.lock | 2 +- Cargo.toml | 2 +- Changelog.md | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cc2d8f9ac..4b2fa9fe0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1374,7 +1374,7 @@ dependencies = [ [[package]] name = "maturin" -version = "0.14.13" +version = "0.14.14" dependencies = [ "anyhow", "base64", diff --git a/Cargo.toml b/Cargo.toml index 0327c7284..746efe96f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["konstin ", "messense "] name = "maturin" -version = "0.14.13" +version = "0.14.14" description = "Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages" exclude = ["test-crates/**/*", "sysconfig/*", "test-data/*", "ci/*", "tests/*", "guide/*", ".github/*"] homepage = "https://github.com/pyo3/maturin" diff --git a/Changelog.md b/Changelog.md index 789a45baa..617710c17 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,9 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.14.14] - 2023-02-24 + * Add support for Emscripten in `generate-ci` command in [#1484](https://github.com/PyO3/maturin/pull/1484) * Add support for linking with pyo3 in abi3 debug mode on Windows in [#1487](https://github.com/PyO3/maturin/pull/1487) * Use default `ext_suffix` for Emscripten target if not provided in `PYO3_CONFIG_FILE` in [#1491](https://github.com/PyO3/maturin/pull/1491) +* Deprecate `package.metadata.maturin.data` in favor of `tool.maturin.data` in `pyproject.toml` in [#1492](https://github.com/PyO3/maturin/pull/1492) ## [0.14.13] - 2023-02-12 @@ -819,7 +822,8 @@ points-0.1.0-py2.py3-none-manylinux1_x86_64.whl | 2,8M | 752K | 85K * Initial Release -[Unreleased]: https://github.com/pyo3/maturin/compare/v0.14.13...HEAD +[Unreleased]: https://github.com/pyo3/maturin/compare/v0.14.14...HEAD +[0.14.14]: https://github.com/pyo3/maturin/compare/v0.14.13...v0.14.14 [0.14.13]: https://github.com/pyo3/maturin/compare/v0.14.12...v0.14.13 [0.14.12]: https://github.com/pyo3/maturin/compare/v0.14.11...v0.14.12 [0.14.11]: https://github.com/pyo3/maturin/compare/v0.14.10...v0.14.11