diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/meson-python | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/meson-python')
-rw-r--r-- | dev-python/meson-python/Manifest | 7 | ||||
-rw-r--r-- | dev-python/meson-python/files/meson-python-0.5.0-defaults.patch | 23 | ||||
-rw-r--r-- | dev-python/meson-python/files/meson-python-0.5.0-pyproject-metadata.patch | 110 | ||||
-rw-r--r-- | dev-python/meson-python/meson-python-0.5.0-r1.ebuild | 46 | ||||
-rw-r--r-- | dev-python/meson-python/meson-python-0.6.0-r1.ebuild | 50 | ||||
-rw-r--r-- | dev-python/meson-python/metadata.xml | 11 |
6 files changed, 247 insertions, 0 deletions
diff --git a/dev-python/meson-python/Manifest b/dev-python/meson-python/Manifest new file mode 100644 index 000000000000..bd630373f75a --- /dev/null +++ b/dev-python/meson-python/Manifest @@ -0,0 +1,7 @@ +AUX meson-python-0.5.0-defaults.patch 819 BLAKE2B 1d6be7b3878b52aad4c0e0cf571a252727fff90e72f9c75eede3046e1736820498c67b0a50e36eba490d8ad0aba4aa645fbcd0ccf7dce5df35d0677016688a57 SHA512 37109dbbd40694070a075d92b26d90ebf42ea53004656da39a531433b31c3edf3c18fdbd5f29c02ba0f704690d6ff438a9de89cd821692fede6c9e6ebae29446 +AUX meson-python-0.5.0-pyproject-metadata.patch 4094 BLAKE2B fa9a654d90fd8e7cc9ab7b1d7d0bd6c275a0767f95fe6abb480846d53ef1b00e4e25d098c17fe22dc8137ea05adfb0d1a920c7afc9b7a60f847b489d1d3e5a1f SHA512 66c7eb0c19caffe092c51629cb789300e2e8e8b9b78161960c1ee7d7a1377e6b9fcf1ce2b8e343a1b1c418ac868ca292dd3de6c123d9434d060671cb17bf8384 +DIST meson-python-0.5.0.gh.tar.gz 30525 BLAKE2B f9afcb0edfdb06ce001b5185bf8c09de18a35d0f2d12f8fd69ed35cf17cc5e987c73724403fe1d6c44c80f1fad41b4b66b07b26e050b551673b3860a3d453a29 SHA512 e3941d258c5d16d0355752aff2f6458705a6af7d83850f679c5304d61699c393e186b9da2fe1a6405cb616a319250351e02ad81ddc8abf042f64c6b42b0be1cf +DIST meson-python-0.6.0.gh.tar.gz 26783 BLAKE2B d5c5b95d5d609487a0efee1ce05b133794705cdb16f2d05d6e08b9201541e31f61a832c7770b4b5ad675f8dd91860c30c67769ce8fc0af2c48e65b0aad187ddb SHA512 25042ea030d2ad323c67daa0a520db936a4a4efa0de1c9f631c47fac22d797e01d1f1707ed407e2931164a35b3916e19a774ee16ab1d45fc91e41c75add57fa1 +EBUILD meson-python-0.5.0-r1.ebuild 981 BLAKE2B 2b8f82ed85cd4e9e08221596cf0d74e8177d42d6184338461cf2c15aa77060aa16f0082935b78a2ec1dbc37bf765d4b394c05fe9e3967b3004283789e8e255e7 SHA512 35d06bb9f0f3facaa3294010978efb5db56c374ed5a7d5f25f60ce334e2c7d96bd94eb3fdc76fbd44b27c6b19f141f3c4d592d661b89a7fa2e4483ec876ec2c7 +EBUILD meson-python-0.6.0-r1.ebuild 1048 BLAKE2B 2c6fa715c72007b7ef19ecc532cc740387da9d05241fc7acd14b094b65086eb863b64470da496c938d945ebc6359f1123cc68ca52a064ca91c01e617ef3740aa SHA512 6c1d80399018626a7bc4b68f6a5dac46a8a5e8f8119603938da653d4793aa1856c62e3089d0960022b1784fd66079f680575486f5e6f8d4bfcfb180d66926764 +MISC metadata.xml 352 BLAKE2B 581fd656bf2da3af0cb7a9f50ef99effc9c2fc54c5012a363a3aaf4cb5cb1715c8626aed86ea176ebbbc22ece33e8b0f76d5c818b4533f99b3bac5b92f75fff1 SHA512 7e57debaea115565ade7e8ab87af065c4580506225df1a203c92fea877a9b918ebfce6fd172412bf318be07a8a4548be492318e5626b31688ed2714f00594d54 diff --git a/dev-python/meson-python/files/meson-python-0.5.0-defaults.patch b/dev-python/meson-python/files/meson-python-0.5.0-defaults.patch new file mode 100644 index 000000000000..07077ba4fdc2 --- /dev/null +++ b/dev-python/meson-python/files/meson-python-0.5.0-defaults.patch @@ -0,0 +1,23 @@ +See https://github.com/FFY00/meson-python/blob/main/mesonpy/__init__.py#L452. + +(Also: https://github.com/FFY00/meson-python/issues/54) +--- a/mesonpy/__init__.py ++++ b/mesonpy/__init__.py +@@ -452,7 +452,7 @@ class Project(): + f'--native-file={os.fspath(self._meson_native_file)}', + # TODO: Allow configuring these arguments + '-Ddebug=false', +- '-Dstrip=true', ++ '-Dstrip=false', + '-Doptimization=2', + *setup_args, + ) +@@ -464,7 +464,7 @@ class Project(): + + @functools.lru_cache(maxsize=None) + def build(self) -> None: +- self._meson('compile') ++ self._meson('compile', '--verbose') + self._meson('install', '--destdir', os.fspath(self._install_dir)) + + @classmethod diff --git a/dev-python/meson-python/files/meson-python-0.5.0-pyproject-metadata.patch b/dev-python/meson-python/files/meson-python-0.5.0-pyproject-metadata.patch new file mode 100644 index 000000000000..fd96d942eb73 --- /dev/null +++ b/dev-python/meson-python/files/meson-python-0.5.0-pyproject-metadata.patch @@ -0,0 +1,110 @@ +https://github.com/FFY00/meson-python/commit/678a586427088a58dfac15bb3fe89b3d7ff0178e +https://github.com/FFY00/meson-python/commit/c01645aa3617ccd424ef3ec052d13ac25e7df433 + +From 678a586427088a58dfac15bb3fe89b3d7ff0178e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Filipe=20La=C3=ADns?= <lains@riseup.net> +Date: Thu, 9 Jun 2022 20:24:32 +0100 +Subject: [PATCH] mesonpy: replace pep621 dependency with pyproject-metadata +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes #33 + +Signed-off-by: Filipe Laíns <lains@riseup.net> +--- a/mesonpy/__init__.py ++++ b/mesonpy/__init__.py +@@ -46,7 +46,7 @@ + + + if typing.TYPE_CHECKING: # pragma: no cover +- import pep621 as _pep621 # noqa: F401 ++ import pyproject_metadata # noqa: F401 + import wheel.wheelfile # noqa: F401 + + +@@ -353,7 +353,7 @@ class Project(): + _ALLOWED_DYNAMIC_FIELDS: ClassVar[List[str]] = [ + 'version', + ] +- _metadata: Optional[_pep621.StandardMetadata] ++ _metadata: Optional[pyproject_metadata.StandardMetadata] + + def __init__( + self, +@@ -372,11 +372,11 @@ def __init__( + self._pep621 = 'project' in self._config + if self.pep621: + try: +- import pep621 # noqa: F811 ++ import pyproject_metadata # noqa: F811 + except ModuleNotFoundError: # pragma: no cover + self._metadata = None + else: +- self._metadata = pep621.StandardMetadata.from_pyproject(self._config, self._source_dir) ++ self._metadata = pyproject_metadata.StandardMetadata.from_pyproject(self._config, self._source_dir) + else: + print( + '{yellow}{bold}! Using Meson to generate the project metadata ' +@@ -550,8 +550,8 @@ def metadata(self) -> bytes: # noqa: C901 + Name: {self.name} + Version: {self.version} + ''').strip().encode() +- # re-import pep621 to raise ModuleNotFoundError if it is really missing +- import pep621 # noqa: F401, F811 ++ # re-import pyproject_metadata to raise ModuleNotFoundError if it is really missing ++ import pyproject_metadata # noqa: F401, F811 + assert self._metadata + # use self.version as the version may be dynamic -- fetched from Meson + core_metadata = self._metadata.as_rfc822() +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -4,7 +4,7 @@ backend-path = ['.'] + requires = [ + 'meson>=0.62.0', + 'ninja', +- 'pep621>=0.3.0', ++ 'pyproject-metadata>=0.5.0', + 'tomli>=1.0.0', + 'typing-extensions>=3.7.4; python_version<"3.8"', + ] +@@ -29,7 +29,7 @@ dependencies = [ + 'colorama; os_name == "nt"', + 'meson>=0.60.0', + 'ninja', +- 'pep621>=0.3.0', # not a hard dependency, only needed for projects that use PEP 621 metadata ++ 'pyproject-metadata>=0.5.0', # not a hard dependency, only needed for projects that use PEP 621 metadata + 'tomli>=1.0.0', + 'typing-extensions>=3.7.4; python_version<"3.8"', + ] +@@ -41,7 +41,6 @@ test = [ + 'pytest-mock', + 'GitPython', + 'auditwheel', +- 'pep621 >= 0.4.0', + ] + docs = [ + 'furo>=2021.08.31', + +From c01645aa3617ccd424ef3ec052d13ac25e7df433 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Filipe=20La=C3=ADns?= <lains@riseup.net> +Date: Thu, 9 Jun 2022 20:27:49 +0100 +Subject: [PATCH] mesonpy: update code to pyproject-metadata 0.5.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Filipe Laíns <lains@riseup.net> +--- a/mesonpy/__init__.py ++++ b/mesonpy/__init__.py +@@ -424,9 +424,6 @@ def __init__( + # set version if dynamic (this fetches it from Meson) + if self._metadata and 'version' in self._metadata.dynamic: + self._metadata.version = self.version +- # version is no longer dynamic +- # XXX: Should this be automatically handled by pep621/pyproject-metadata? +- self._metadata.dynamic.remove('version') + + def _proc(self, *args: str) -> None: + print('{cyan}{bold}+ {}{reset}'.format(' '.join(args), **_STYLES)) + diff --git a/dev-python/meson-python/meson-python-0.5.0-r1.ebuild b/dev-python/meson-python/meson-python-0.5.0-r1.ebuild new file mode 100644 index 000000000000..708c817c7349 --- /dev/null +++ b/dev-python/meson-python/meson-python-0.5.0-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=standalone +PYTHON_COMPAT=( python3_{8..10} ) + +inherit distutils-r1 + +DESCRIPTION="Meson PEP 517 Python build backend" +HOMEPAGE=" + https://pypi.org/project/meson-python/ + https://github.com/FFY00/meson-python/ +" +SRC_URI=" + https://github.com/FFY00/meson-python/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="EUPL-1.2" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-python/pyproject-metadata-0.3.0[${PYTHON_USEDEP}] + >=dev-python/tomli-1.0.0[${PYTHON_USEDEP}] + >=dev-util/meson-0.60.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/GitPython[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + dev-util/patchelf + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-pyproject-metadata.patch + "${FILESDIR}"/${PN}-0.5.0-defaults.patch +) + +distutils_enable_sphinx docs \ + dev-python/furo \ + dev-python/sphinx-autodoc-typehints +distutils_enable_tests pytest diff --git a/dev-python/meson-python/meson-python-0.6.0-r1.ebuild b/dev-python/meson-python/meson-python-0.6.0-r1.ebuild new file mode 100644 index 000000000000..9ff05d7701f0 --- /dev/null +++ b/dev-python/meson-python/meson-python-0.6.0-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=standalone +PYTHON_COMPAT=( python3_{8..10} ) + +inherit distutils-r1 + +DESCRIPTION="Meson PEP 517 Python build backend" +HOMEPAGE=" + https://pypi.org/project/meson-python/ + https://github.com/FFY00/meson-python/ +" +SRC_URI=" + https://github.com/FFY00/meson-python/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-python/pyproject-metadata-0.5.0[${PYTHON_USEDEP}] + >=dev-python/tomli-1.0.0[${PYTHON_USEDEP}] + >=dev-util/meson-0.60.0[${PYTHON_USEDEP}] + dev-util/patchelf +" +BDEPEND=" + test? ( + dev-python/GitPython[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.0-defaults.patch +) + +distutils_enable_sphinx docs \ + dev-python/furo \ + dev-python/sphinx-autodoc-typehints +distutils_enable_tests pytest + +EPYTEST_DESELECT=( + # https://github.com/FFY00/meson-python/issues/86 + tests/test_sdist.py::test_contents_unstaged +) diff --git a/dev-python/meson-python/metadata.xml b/dev-python/meson-python/metadata.xml new file mode 100644 index 000000000000..e2b414a5e2c6 --- /dev/null +++ b/dev-python/meson-python/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">FFY00/meson-python</remote-id> + <remote-id type="pypi">meson-python</remote-id> + </upstream> +</pkgmetadata> |