<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/f588f58d366d5c6e4bee0f393528203e48dc5371">https://github.com/macports/macports-ports/commit/f588f58d366d5c6e4bee0f393528203e48dc5371</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit f588f58d366d5c6e4bee0f393528203e48dc5371
</span>Author: Kirill A. Korinsky <kirill@korins.ky>
AuthorDate: Wed May 3 11:04:02 2023 +0200

<span style='display:block; white-space:pre;color:#404040;'>    py-maturin: run maturin with version
</span>---
 python/py-maturin/Portfile                         |  4 +-
 python/py-maturin/files/patch-maturin-command.diff | 49 ++++++++++++++++++++++
 2 files changed, 52 insertions(+), 1 deletion(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-maturin/Portfile b/python/py-maturin/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index c7ef234a39a..81d74cc7dc5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-maturin/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-maturin/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,7 +6,7 @@ PortGroup           python 1.0
</span> 
 name                py-maturin
 version             0.14.17
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision            0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision            1
</span> categories-append   devel
 license             MIT Apache-2
 supported_archs     arm64 x86_64
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -32,6 +32,8 @@ if {${name} ne ${subport}} {
</span>                     port:py${python.version}-setuptools \
                     port:py${python.version}-setuptools-rust
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    patchfiles      patch-maturin-command.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>     if {${python.version} < 311} {
         depends_run-append \
                     port:py${python.version}-tomli
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-maturin/files/patch-maturin-command.diff b/python/py-maturin/files/patch-maturin-command.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..3f9f49d77ce
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-maturin/files/patch-maturin-command.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,49 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- maturin/__init__.py    2023-04-06 02:38:20
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ maturin/__init__.py    2023-05-03 00:03:28
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -52,7 +52,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     # PEP 517 specifies that only `sys.executable` points to the correct
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     # python interpreter
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     command = [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-        "maturin",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++        f"maturin-{sys.version_info.major}.{sys.version_info.minor}",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         "pep517",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         "build-wheel",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         "-i",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -92,7 +92,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # noinspection PyUnusedLocal
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def build_sdist(sdist_directory, config_settings=None):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    command = ["maturin", "pep517", "write-sdist", "--sdist-directory", sdist_directory]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    command = [f"maturin-{sys.version_info.major}.{sys.version_info.minor}", "pep517", "write-sdist", "--sdist-directory", sdist_directory]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     print("Running `{}`".format(" ".join(command)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     sys.stdout.flush()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -154,7 +154,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         sys.exit(1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     command = [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-        "maturin",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++        f"maturin-{sys.version_info.major}.{sys.version_info.minor}",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         "pep517",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         "write-dist-info",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         "--metadata-directory",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- maturin/import_hook.py 2023-04-06 02:38:20
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ maturin/import_hook.py 2023-05-03 00:04:17
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -84,7 +84,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     if project_dir.exists():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         shutil.rmtree(project_dir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    command = ["maturin", "new", "-b", bindings, project_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    command = [f"maturin-{sys.version_info.major}.{sys.version_info.minor}", "new", "-b", bindings, project_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     result = subprocess.run(command, stdout=subprocess.PIPE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     if result.returncode != 0:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         sys.stderr.write(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -103,7 +103,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def build_module(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     manifest_path: pathlib.Path, bindings: Optional[str] = None, release: bool = False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    command = ["maturin", "develop", "-m", manifest_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    command = [f"maturin-{sys.version_info.major}.{sys.version_info.minor}", "develop", "-m", manifest_path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     if bindings:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         command.append("-b")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         command.append(bindings)
</span></pre><pre style='margin:0'>

</pre>