<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/a9a8bbe179b2e643a11b6b4cadc2c979238cd2b4">https://github.com/macports/macports-ports/commit/a9a8bbe179b2e643a11b6b4cadc2c979238cd2b4</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit a9a8bbe179b2e643a11b6b4cadc2c979238cd2b4
</span>Author: Renee Otten <reneeotten@macports.org>
AuthorDate: Sat Sep 9 20:23:27 2023 -0400
<span style='display:block; white-space:pre;color:#404040;'> py-meson-python: new port, version 0.14.0
</span>---
python/py-meson-python/Portfile | 46 ++++++++++++++++++++++
.../files/patch-mesonpy-__init__.py.diff | 38 ++++++++++++++++++
2 files changed, 84 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-meson-python/Portfile b/python/py-meson-python/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..a86ceefd7b4
</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-meson-python/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,46 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup python 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name py-meson-python
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 0.14.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories-append devel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs noarch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms {darwin any}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {reneeotten @reneeotten} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Meson Python build backend (PEP 517)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description {*}${description}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://github.com/mesonbuild/meson-python
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distname meson_python-${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 68a07274b778ce41ab04b6efa5aa46c281889436 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 b96866690326544dfe452583753ac3f43313227e9fd9416701a8df90af212234 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 78824
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+python.versions 38 39 310 311 312
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+python.pep517 yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${name} ne ${subport}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles patch-mesonpy-__init__.py.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@@PYVER@@|${python.branch}|g" ${worksrcpath}/mesonpy/__init__.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-meson \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-pyproject_metadata \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-setuptools
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${python.version} < 311} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-tomli
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-meson-python/files/patch-mesonpy-__init__.py.diff b/python/py-meson-python/files/patch-mesonpy-__init__.py.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..d90ad9f6645
</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-meson-python/files/patch-mesonpy-__init__.py.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,38 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- mesonpy/__init__.py.orig 2023-10-23 22:49:04
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ mesonpy/__init__.py 2023-10-23 22:51:05
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -757,7 +757,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if reconfigure:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ setup_args.insert(0, '--reconfigure')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self._run(['meson', 'setup', *setup_args])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._run(['meson-@@PYVER@@', 'setup', *setup_args])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @cached_property
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def _wheel_builder(self) -> _WheelBuilder:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -777,7 +777,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # environment. Using the --ninja-args option allows to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # provide the exact same semantics for the compile arguments
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # provided by the users.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cmd = ['meson', 'compile']
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cmd = ['meson-@@PYVER@@', 'compile']
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ args = list(self._meson_args['compile'])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if args:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cmd.append(f'--ninja-args={args!r}')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -866,7 +866,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def sdist(self, directory: Path) -> pathlib.Path:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """Generates a sdist (source distribution) in the specified directory."""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # generate meson dist file
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self._run(['meson', 'dist', '--allow-dirty', '--no-tests', '--formats', 'gztar', *self._meson_args['dist']])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._run(['meson-@@PYVER@@', 'dist', '--allow-dirty', '--no-tests', '--formats', 'gztar', *self._meson_args['dist']])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # move meson dist file to output path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dist_name = f'{self.name}-{self.version}'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -984,7 +984,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ required_version = _parse_version_string(version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- meson_version = subprocess.run(['meson', '--version'], check=False, text=True, capture_output=True).stdout
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ meson_version = subprocess.run(['meson-@@PYVER@@', '--version'], check=False, text=True, capture_output=True).stdout
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if _parse_version_string(meson_version) < required_version:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ raise ConfigError(f'Could not find meson version {version} or newer, found {meson_version}.')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>