diff options
author | Repository mirror & CI <repomirrorci@gentoo.org> | 2022-05-11 16:50:26 +0000 |
---|---|---|
committer | Repository mirror & CI <repomirrorci@gentoo.org> | 2022-05-11 16:50:26 +0000 |
commit | da31c033f4cce635e141032716929c2f97d8e616 (patch) | |
tree | 4b8694d59d8810057a6a6b12c3d8f08828c1db77 | |
parent | 2022-05-11 16:18:20 UTC (diff) | |
parent | dev-util/gitlab-runner: add 14.9.2 (diff) | |
download | gentoo-da31c033f4cce635e141032716929c2f97d8e616.tar.gz gentoo-da31c033f4cce635e141032716929c2f97d8e616.tar.bz2 gentoo-da31c033f4cce635e141032716929c2f97d8e616.zip |
Merge updates from master
20 files changed, 547 insertions, 194 deletions
diff --git a/dev-python/ansible-compat/ansible-compat-2.0.3.ebuild b/dev-python/ansible-compat/ansible-compat-2.0.3.ebuild index 963815e41a06..5b3828e761ae 100644 --- a/dev-python/ansible-compat/ansible-compat-2.0.3.ebuild +++ b/dev-python/ansible-compat/ansible-compat-2.0.3.ebuild @@ -55,3 +55,7 @@ distutils_enable_sphinx docs \ dev-python/sphinx_ansible_theme distutils_enable_tests pytest + +python_test() { + epytest -p pytest_markdown.plugin +} diff --git a/dev-python/brotlicffi/brotlicffi-1.0.9.2-r1.ebuild b/dev-python/brotlicffi/brotlicffi-1.0.9.2-r1.ebuild index b19f4a20520d..fc75635dab17 100644 --- a/dev-python/brotlicffi/brotlicffi-1.0.9.2-r1.ebuild +++ b/dev-python/brotlicffi/brotlicffi-1.0.9.2-r1.ebuild @@ -59,7 +59,3 @@ src_unpack() { src_configure() { export USE_SHARED_BROTLI=1 } - -python_test() { - epytest test -} diff --git a/dev-python/distlib/distlib-0.3.4-r2.ebuild b/dev-python/distlib/distlib-0.3.4-r2.ebuild new file mode 100644 index 000000000000..0b346ea09204 --- /dev/null +++ b/dev-python/distlib/distlib-0.3.4-r2.ebuild @@ -0,0 +1,65 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..11} pypy3 ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="Low-level components of distutils2/packaging" +HOMEPAGE=" + https://pypi.org/project/distlib/ + https://bitbucket.org/pypa/distlib/ +" +# pypi has zip only :-( +SRC_URI=" + https://bitbucket.org/pypa/distlib/get/${PV}.tar.bz2 -> ${P}.tar.bz2 +" + +LICENSE="PSF-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +# pypiserver is called as external executable +# openpyxl installs invalid metadata that breaks distlib +BDEPEND=" + test? ( + dev-python/pypiserver + !!<dev-python/openpyxl-3.0.3[${PYTHON_USEDEP}] + ) +" + +src_prepare() { + # make sure they're not used + rm tests/pypi-server-standalone.py || die + + # use system pypiserver instead of broken bundled one + eapply "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py || die + + # doesn't work with our patched pip + sed -i -e '/PIP_AVAIL/s:True:False:' tests/test_wheel.py || die + + # broken with pypy3 + sed -i -e 's:test_custom_shebang:_&:' tests/test_scripts.py || die + # broken with py3.11, doesn't look important + sed -i -e 's:test_sequencer_basic:_&:' tests/test_util.py || die + + distutils-r1_src_prepare +} + +python_test() { + local -x SKIP_ONLINE=1 + local -x PYTHONHASHSEED=0 + + # disable system-site-packages -- distlib has no deps, and is very + # fragile to packages actually installed on the system + sed -i -e '/system-site-packages/s:true:false:' \ + "${BUILD_DIR}/install${EPREFIX}/usr/bin/pyvenv.cfg" || die + + "${EPYTHON}" tests/test_all.py -v -x || + die "Tests failed with ${EPYTHON}" +} diff --git a/dev-python/editables/editables-0.3.ebuild b/dev-python/editables/editables-0.3.ebuild index 0aa9dc7f2dc0..32ead7bcc346 100644 --- a/dev-python/editables/editables-0.3.ebuild +++ b/dev-python/editables/editables-0.3.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( pypy3 python3_{8..10} ) +PYTHON_COMPAT=( pypy3 python3_{8..11} ) inherit distutils-r1 diff --git a/dev-python/psutil/Manifest b/dev-python/psutil/Manifest index a8eb6c71de71..558b4186bfca 100644 --- a/dev-python/psutil/Manifest +++ b/dev-python/psutil/Manifest @@ -1,2 +1 @@ -DIST psutil-5.7.3.tar.gz 465556 BLAKE2B 6a9f31fcba571f381c1f4c904a9ff65659d13ed64e91df478aa7df4dabb87a35c4fbd9c0491a3d10b9eaf0fdcc8f2407fcf7144e729043eda605dfe6e6f93844 SHA512 8fcff56dd4e4c1b877c09023721e6f562424f7f84ae5304d518976a1e7f21dd026772f1abfc063bdd0857a375bc869f42febde090dc0b65918d1ebf44e3ad71d DIST psutil-5.9.0.tar.gz 478322 BLAKE2B 763c8ae14ae546bed64a360047d2ce38783e9e7e939160f751c4ccc94b8e023aaa4cdca426f584e05dae8b1326333660e216d7cb3edd820e24a931dddfa5160f SHA512 b521cfce51e90fdf87ba19bf8069877e3210aede92c17460ea0b00324a36e133168e4bff550462d07ab6d93c597c6560d68954340031ff43168d54a8e5d4c4e7 diff --git a/dev-python/psutil/files/psutil-5.7.2-tests.patch b/dev-python/psutil/files/psutil-5.7.2-tests.patch deleted file mode 100644 index 3faaedad6661..000000000000 --- a/dev-python/psutil/files/psutil-5.7.2-tests.patch +++ /dev/null @@ -1,112 +0,0 @@ -From e910d08976e00bc12b5a516daa9e6a6d42d48354 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 19 Feb 2020 07:27:32 +0100 -Subject: [PATCH] Skip broken tests on Gentoo - ---- - psutil/tests/test_linux.py | 8 ++++++++ - psutil/tests/test_posix.py | 1 + - psutil/tests/test_process.py | 2 ++ - psutil/tests/test_system.py | 1 + - 4 files changed, 12 insertions(+) - -diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py -index e51f8bd5..48527ccb 100755 ---- a/psutil/tests/test_linux.py -+++ b/psutil/tests/test_linux.py -@@ -17,5 +17,6 @@ import re - import shutil - import socket - import struct -+import sys - import textwrap - import time -@@ -381,6 +382,8 @@ class TestSystemVirtualMemory(unittest.TestCase): - ret = psutil.virtual_memory() - assert m.called - self.assertEqual(ret.available, 2057400 * 1024 + 4818144 * 1024) -+ if sys.version_info < (3,): -+ return - w = ws[0] - self.assertIn( - "inactive memory stats couldn't be determined", str(w.message)) -@@ -411,6 +414,8 @@ class TestSystemVirtualMemory(unittest.TestCase): - ret = psutil.virtual_memory() - self.assertEqual( - ret.available, 2057400 * 1024 + 4818144 * 1024) -+ if sys.version_info < (3,): -+ return - w = ws[0] - self.assertIn( - "inactive memory stats couldn't be determined", -@@ -882,6 +887,7 @@ class TestLoadAvg(unittest.TestCase): - @unittest.skipIf(not LINUX, "LINUX only") - class TestSystemNetIfAddrs(unittest.TestCase): - -+ @unittest.skip("broken on Gentoo") - def test_ips(self): - for name, addrs in psutil.net_if_addrs().items(): - for addr in addrs: -@@ -1364,7 +1370,8 @@ class TestMisc(unittest.TestCase): - psutil.PROCFS_PATH = "/proc" - os.rmdir(tdir) - - @retry_on_failure() -+ @unittest.skip("broken on Gentoo") - def test_issue_687(self): - # In case of thread ID: - # - pid_exists() is supposed to return False -@@ -2073,6 +2080,7 @@ class TestProcessAgainstStatus(unittest.TestCase): - value = self.read_status_file("nonvoluntary_ctxt_switches:") - self.assertEqual(self.proc.num_ctx_switches().involuntary, value) - -+ @unittest.skip("broken on Gentoo") - def test_cpu_affinity(self): - value = self.read_status_file("Cpus_allowed_list:") - if '-' in str(value): -diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py -index a96b310f..70199203 100755 ---- a/psutil/tests/test_posix.py -+++ b/psutil/tests/test_posix.py -@@ -364,6 +364,7 @@ class TestSystemAPIs(unittest.TestCase): - "couldn't find %s nic in 'ifconfig -a' output\n%s" % ( - nic, output)) - -+ @unittest.skip("broken on Gentoo") - @unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI") - @retry_on_failure() - def test_users(self): -diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py -index 987bdf38..cb04f3ef 100755 ---- a/psutil/tests/test_process.py -+++ b/psutil/tests/test_process.py -@@ -350,6 +350,7 @@ class TestProcess(unittest.TestCase): - self.assertGreaterEqual(io2[i], 0) - self.assertGreaterEqual(io2[i], 0) - -+ @unittest.skip("fails if builder is ioniced already") - @unittest.skipIf(not HAS_IONICE, "not supported") - @unittest.skipIf(not LINUX, "linux only") - def test_ionice_linux(self): -@@ -1495,6 +1496,7 @@ class TestProcess(unittest.TestCase): - d2 = clean_dict(os.environ.copy()) - self.assertEqual(d1, d2) - -+ @unittest.skip("broken by sandbox") - @unittest.skipIf(not HAS_ENVIRON, "not supported") - @unittest.skipIf(not POSIX, "POSIX only") - def test_weird_environ(self): -diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py -index 3834209f..b07b5883 100755 ---- a/psutil/tests/test_system.py -+++ b/psutil/tests/test_system.py -@@ -215,6 +215,7 @@ class TestMiscAPIs(unittest.TestCase): - self.assertGreater(bt, 0) - self.assertLess(bt, time.time()) - -+ @unittest.skip("broken on Gentoo") - @unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI") - def test_users(self): - users = psutil.users() --- -2.25.1 diff --git a/dev-python/psutil/psutil-5.7.3.ebuild b/dev-python/psutil/psutil-5.7.3.ebuild deleted file mode 100644 index ddf8240254b4..000000000000 --- a/dev-python/psutil/psutil-5.7.3.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{7..10} pypy3 ) - -inherit distutils-r1 - -DESCRIPTION="Retrieve information on running processes and system utilization" -HOMEPAGE="https://github.com/giampaolo/psutil https://pypi.org/project/psutil/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="test" -RESTRICT="!test? ( test )" - -PATCHES=( - "${FILESDIR}/psutil-5.7.2-tests.patch" -) - -python_test() { - if [[ ${EPYTHON} == pypy* ]]; then - ewarn "Not running tests on ${EPYTHON} since they are broken" - return 0 - fi - - # since we are running in an environment a bit similar to CI, - # let's skip the tests that are disable for CI - TRAVIS=1 APPVEYOR=1 "${EPYTHON}" psutil/tests/runner.py || - die "tests failed with ${EPYTHON}" -} - -python_compile() { - # force -j1 to avoid .o linking race conditions - local MAKEOPTS=-j1 - distutils-r1_python_compile -} diff --git a/dev-python/pytest-freezegun/pytest-freezegun-0.4.2-r1.ebuild b/dev-python/pytest-freezegun/pytest-freezegun-0.4.2-r1.ebuild index 95fe6cb006d5..033c1633aa62 100644 --- a/dev-python/pytest-freezegun/pytest-freezegun-0.4.2-r1.ebuild +++ b/dev-python/pytest-freezegun/pytest-freezegun-0.4.2-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( pypy3 python3_{8..10} ) +PYTHON_COMPAT=( pypy3 python3_{8..11} ) inherit distutils-r1 diff --git a/dev-python/python-poppler-qt5/Manifest b/dev-python/python-poppler-qt5/Manifest index 1139449118c1..ac4ae3ac9c84 100644 --- a/dev-python/python-poppler-qt5/Manifest +++ b/dev-python/python-poppler-qt5/Manifest @@ -1 +1,2 @@ DIST python-poppler-qt5-0.75.0.tar.gz 23281 BLAKE2B 06b2b0899d2a3cfc84e623b98cc3379aa45ac9ca9267f25168cce04f2ed761fd897043376fda3386b2daff2b46850b24782cafd6aabb13a8e7d6f3920b55a02c SHA512 2f03036a2eaeb8e28875f19a813ff85a91c1e9a94301bdb736ecc50e7ececb4de2622728e6fecbf64e114435529f82b6afd23d772e2d3910ae03d5d2b5da3205 +DIST python-poppler-qt5-21.3.0.tar.gz 25641 BLAKE2B 5937f1ddc1493bb1ef1d98b91dd8ccec4bd8c835956d84c8d7ce7a1cedcbe16854861e1f13825812e0f74c335020f0d74aad2d2bbc7a5780c6eb3ac77437f13b SHA512 cc942a860c2c999ff04fb0468b1556b0e23e7aa19a0185a39c5e903e717dca64bcbd51b8fe34b6885bd789cbf5cc1080c2ca1dcee30b3e69fa1721618e8db278 diff --git a/dev-python/python-poppler-qt5/python-poppler-qt5-21.3.0.ebuild b/dev-python/python-poppler-qt5/python-poppler-qt5-21.3.0.ebuild new file mode 100644 index 000000000000..11ca6622f42e --- /dev/null +++ b/dev-python/python-poppler-qt5/python-poppler-qt5-21.3.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=sip +PYTHON_COMPAT=( python3_{8..10} ) + +inherit distutils-r1 multiprocessing qmake-utils + +DESCRIPTION="Python binding for libpoppler-qt5" +HOMEPAGE="https://github.com/frescobaldi/python-poppler-qt5" +SRC_URI="https://github.com/frescobaldi/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + app-text/poppler[qt5] + dev-python/PyQt5[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" + +src_configure() { + DISTUTILS_ARGS=( + --jobs="$(makeopts_jobs)" + --qmake="$(qt5_get_bindir)"/qmake + --qmake-setting="$(qt5_get_qmake_args)" + --verbose + ) +} diff --git a/dev-python/rfc3339-validator/rfc3339-validator-0.1.4-r1.ebuild b/dev-python/rfc3339-validator/rfc3339-validator-0.1.4-r1.ebuild index b85efbca0543..72cb16eb1624 100644 --- a/dev-python/rfc3339-validator/rfc3339-validator-0.1.4-r1.ebuild +++ b/dev-python/rfc3339-validator/rfc3339-validator-0.1.4-r1.ebuild @@ -33,7 +33,3 @@ BDEPEND=" " distutils_enable_tests pytest - -python_test() { - epytest tests -} diff --git a/dev-python/sentry-sdk/sentry-sdk-1.5.12.ebuild b/dev-python/sentry-sdk/sentry-sdk-1.5.12.ebuild index 3d087789fbca..51d4790601bb 100644 --- a/dev-python/sentry-sdk/sentry-sdk-1.5.12.ebuild +++ b/dev-python/sentry-sdk/sentry-sdk-1.5.12.ebuild @@ -85,7 +85,3 @@ EPYTEST_DESELECT=( # TODO tests/integrations/wsgi/test_wsgi.py::test_auto_session_tracking_with_aggregates ) - -python_test() { - epytest tests -} diff --git a/dev-python/sip/files/sip-6.5.0-pep517-args.patch b/dev-python/sip/files/sip-6.5.0-pep517-args.patch new file mode 100644 index 000000000000..c4d39dcf6156 --- /dev/null +++ b/dev-python/sip/files/sip-6.5.0-pep517-args.patch @@ -0,0 +1,190 @@ +Backport from https://www.riverbankcomputing.com/hg/sip/ + +changeset: 2771:8543f04b374f +branch: 6.6-maint +tag: tip +user: Phil Thompson <phil@riverbankcomputing.com> +date: Tue May 10 13:58:28 2022 +0100 +summary: Fixed the PEP571 backend to handle multiple instances of the same config + +changeset: 2769:c02af095a016 +branch: 6.6-maint +user: Phil Thompson <phil@riverbankcomputing.com> +date: Sat May 07 15:18:14 2022 +0100 +summary: Fix an API backward incompatibility. + +changeset: 2768:98dbce3e62f1 +branch: 6.6-maint +user: Phil Thompson <phil@riverbankcomputing.com> +date: Sat May 07 15:03:49 2022 +0100 +summary: Any config settings passed by a PEP 571 frontend are now used. + +diff -r 8583e2bb1b32 sipbuild/abstract_project.py +--- a/sipbuild/abstract_project.py Thu Nov 25 18:15:32 2021 +0000 ++++ b/sipbuild/abstract_project.py Tue May 10 16:15:30 2022 +0200 +@@ -1,4 +1,4 @@ +-# Copyright (c) 2020, Riverbank Computing Limited ++# Copyright (c) 2022, Riverbank Computing Limited + # All rights reserved. + # + # This copy of SIP is licensed for use under the terms of the SIP License +@@ -34,7 +34,7 @@ + """ This specifies the API of a project. """ + + @classmethod +- def bootstrap(cls, tool, tool_description=''): ++ def bootstrap(cls, tool, tool_description='', arguments=None): + """ Return an AbstractProject instance fully configured for a + particular command line tool. + """ +@@ -79,6 +79,10 @@ + "The project factory did not return an AbstractProject " + "object") + ++ # We set this as an attribute rather than change the API of the ctor or ++ # setup(). ++ project.arguments = arguments ++ + # Complete the configuration of the project. + project.setup(pyproject, tool, tool_description) + +diff -r 8583e2bb1b32 sipbuild/api.py +--- a/sipbuild/api.py Thu Nov 25 18:15:32 2021 +0000 ++++ b/sipbuild/api.py Tue May 10 16:15:30 2022 +0200 +@@ -1,4 +1,4 @@ +-# Copyright (c) 2019, Riverbank Computing Limited ++# Copyright (c) 2022, Riverbank Computing Limited + # All rights reserved. + # + # This copy of SIP is licensed for use under the terms of the SIP License +@@ -28,10 +28,8 @@ + def build_sdist(sdist_directory, config_settings=None): + """ The PEP 517 hook for building an sdist from pyproject.toml. """ + +- # Note that we ignore config_settings until we have a frontend that we can +- # fully test with. (pip seems lacking at the moment.) +- +- project = AbstractProject.bootstrap('pep517') ++ project = AbstractProject.bootstrap('sdist', ++ arguments=_convert_config_settings(config_settings)) + + # pip executes this in a separate process and doesn't handle exceptions + # very well. However it does capture stdout and (eventually) show it to +@@ -45,10 +43,8 @@ + def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): + """ The PEP 517 hook for building a wheel from pyproject.toml. """ + +- # Note that we ignore config_settings until we have a frontend that we can +- # fully test with. (pip seems lacking at the moment.) +- +- project = AbstractProject.bootstrap('pep517') ++ project = AbstractProject.bootstrap('wheel', ++ arguments=_convert_config_settings(config_settings)) + + # pip executes this in a separate process and doesn't handle exceptions + # very well. However it does capture stdout and (eventually) show it to +@@ -57,3 +53,26 @@ + return project.build_wheel(wheel_directory) + except Exception as e: + handle_exception(e) ++ ++ ++def _convert_config_settings(config_settings): ++ """ Return any configuration settings from the frontend to a pseudo-command ++ line. ++ """ ++ ++ if config_settings is None: ++ config_settings = {} ++ ++ args = [] ++ ++ for name, value in config_settings.items(): ++ if value: ++ if not isinstance(value, list): ++ value = [value] ++ ++ for m_value in value: ++ args.append(name + '=' + m_value) ++ else: ++ args.append(name) ++ ++ return args +diff -r 8583e2bb1b32 sipbuild/configurable.py +--- a/sipbuild/configurable.py Thu Nov 25 18:15:32 2021 +0000 ++++ b/sipbuild/configurable.py Tue May 10 16:15:30 2022 +0200 +@@ -1,4 +1,4 @@ +-# Copyright (c) 2021, Riverbank Computing Limited ++# Copyright (c) 2022, Riverbank Computing Limited + # All rights reserved. + # + # This copy of SIP is licensed for use under the terms of the SIP License +@@ -244,7 +244,7 @@ + """ + + # The tools that will build a set of bindings. +- BUILD_TOOLS = ('build', 'install', 'pep517', 'wheel') ++ BUILD_TOOLS = ('build', 'install', 'wheel') + + # All the valid tools. + _ALL_TOOLS = BUILD_TOOLS + ('sdist', ) +diff -r 8583e2bb1b32 sipbuild/project.py +--- a/sipbuild/project.py Thu Nov 25 18:15:32 2021 +0000 ++++ b/sipbuild/project.py Tue May 10 16:15:30 2022 +0200 +@@ -155,6 +155,7 @@ + + # The current directory should contain the .toml file. + self.root_dir = os.getcwd() ++ self.arguments = None + self.bindings = collections.OrderedDict() + self.bindings_factories = [] + self.builder = None +@@ -204,11 +205,6 @@ + def apply_user_defaults(self, tool): + """ Set default values for user options that haven't been set yet. """ + +- # If we are the backend to a 3rd-party frontend (most probably pip) +- # then let it handle the verbosity of messages. +- if self.verbose is None and tool == '': +- self.verbose = True +- + # This is only used when creating sdist and wheel files. + if self.name is None: + self.name = self.metadata['name'] +@@ -569,14 +565,9 @@ + # Set the initial configuration from the pyproject.toml file. + self._set_initial_configuration(pyproject, tool) + +- # Add any tool-specific command line options for (so far unspecified) ++ # Add any tool-specific command line arguments for (so far unspecified) + # parts of the configuration. +- if tool != 'pep517': +- self._configure_from_command_line(tool, tool_description) +- else: +- # Until pip improves it's error reporting we give the user all the +- # help we can. +- self.verbose = True ++ self._configure_from_arguments(tool, tool_description) + + # Now that any help has been given we can report a problematic + # pyproject.toml file. +@@ -712,8 +703,8 @@ + for bindings in self.bindings.values(): + bindings.verify_configuration(tool) + +- def _configure_from_command_line(self, tool, tool_description): +- """ Update the configuration from the user supplied command line. """ ++ def _configure_from_arguments(self, tool, tool_description): ++ """ Update the configuration from any user supplied arguments. """ + + from argparse import SUPPRESS + from .argument_parser import ArgumentParser +@@ -739,7 +730,7 @@ + bindings.add_command_line_options(parser, tool, all_options) + + # Parse the arguments and update the corresponding configurables. +- args = parser.parse_args() ++ args = parser.parse_args(self.arguments) + + for option, configurables in all_options.items(): + for configurable in configurables: diff --git a/dev-python/sip/sip-6.5.0-r1.ebuild b/dev-python/sip/sip-6.5.0-r1.ebuild new file mode 100644 index 000000000000..3f31cadaf6d1 --- /dev/null +++ b/dev-python/sip/sip-6.5.0-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +DISTUTILS_USE_SETUPTOOLS=rdepend +inherit distutils-r1 + +DESCRIPTION="Python bindings generator for C/C++ libraries" +HOMEPAGE="https://www.riverbankcomputing.com/software/sip/ https://pypi.org/project/sip/" + +MY_P=${PN}-${PV/_pre/.dev} +if [[ ${PV} == *_pre* ]]; then + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz" +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz" +fi +S=${WORKDIR}/${MY_P} + +LICENSE="|| ( GPL-2 GPL-3 SIP )" +SLOT="5" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" + +RDEPEND=" + !<dev-python/sip-4.19.25-r1[${PYTHON_USEDEP}] + !=dev-python/sip-5.5.0-r0[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/toml[${PYTHON_USEDEP}] +" + +distutils_enable_sphinx doc --no-autodoc + +PATCHES=( + "${FILESDIR}"/${P}-pep517-args.patch +) diff --git a/dev-util/gitlab-runner/Manifest b/dev-util/gitlab-runner/Manifest index 51aa1590d5ba..28c5788d80f8 100644 --- a/dev-util/gitlab-runner/Manifest +++ b/dev-util/gitlab-runner/Manifest @@ -1,4 +1,8 @@ DIST gitlab-runner-14.10.0-deps.tar.xz 142897024 BLAKE2B 353b209e62b87edd7f684c2b936446468e49d5124f93fffe32e7b30fb78e6d9f28ed19c25458fde5f4d45148ef18c4fad785120c50c4c847632371854310ba9f SHA512 49ff9f0c09fb7eb4ea4657babc2e1fdff08f0818f941d5cf926807a3f4912f573c8d54f45fd3d1c180a9e669c5ab5bca5d607fbd520c974c936711bd448527ec DIST gitlab-runner-14.10.0.tar.gz 1265438 BLAKE2B fbbb1378c8263ac476f6a33eeb0be37676a3d29eb6330b49659edcf87456a5893203e4f371ba6647fe6ee1bad42d78ebff6b4ad93c2266b38da99d27783eaaee SHA512 01836f3a45196596cffb5c160493881995649169649c8d2b4096a44b7286384098040124f62092c8b50d7a2b69c9cd436f2e83d5ab86a1c205fcc9494977e114 +DIST gitlab-runner-14.10.1-deps.tar.xz 142897024 BLAKE2B 353b209e62b87edd7f684c2b936446468e49d5124f93fffe32e7b30fb78e6d9f28ed19c25458fde5f4d45148ef18c4fad785120c50c4c847632371854310ba9f SHA512 49ff9f0c09fb7eb4ea4657babc2e1fdff08f0818f941d5cf926807a3f4912f573c8d54f45fd3d1c180a9e669c5ab5bca5d607fbd520c974c936711bd448527ec +DIST gitlab-runner-14.10.1.tar.gz 1265690 BLAKE2B c455c08f1530b4fa6d63d74736adeb7cfb76c5f4f56577e2c22ba64630c88a3b0933fd0e3fbcf173d7263f6150bd77491fa091c5c8a4821dabf4bfee24928a52 SHA512 5b3a6b1b13569a9f24206f078bd864689fc6cf9c7f249b3fc5adb36e9c59bc6b53f218a7e31aab8537f188500f072a8e73ad9422e03e2eb44c21521c903044a1 DIST gitlab-runner-14.9.1-deps.tar.xz 142907928 BLAKE2B fb61c7b03d3dd63196bb4de0042a3c65035a3fc132435d7844635bb968a6bfe43e05fca053bfa96ba22cc9fd601d533857bffdf8bd734e90e86fefce8091da34 SHA512 d077cc1220ad33196655e578937c910c7b368eef57bb96d385eac0957e5f8902bb3720b1614f3179753929f25589a8d1d543bcb61d4cf5972bf4ada96a4056d8 DIST gitlab-runner-14.9.1.tar.gz 1259997 BLAKE2B a4694198630fb2cc47ad4e9fe36b366ae695d8a4618e755b9ff12b608d5d8266614cc649b0e63bca125919ebe8dd40859fc7804cd8bb40ed391a54d6ae65a325 SHA512 ec804f3a4982414d52a4f3b5ff1560c5342a3650f1bb3edefa211a3810b17e202263abc67bfcd4423fe88b5acd501da1d23f3980a078800ab25932625ff75bc5 +DIST gitlab-runner-14.9.2-deps.tar.xz 142907928 BLAKE2B fb61c7b03d3dd63196bb4de0042a3c65035a3fc132435d7844635bb968a6bfe43e05fca053bfa96ba22cc9fd601d533857bffdf8bd734e90e86fefce8091da34 SHA512 d077cc1220ad33196655e578937c910c7b368eef57bb96d385eac0957e5f8902bb3720b1614f3179753929f25589a8d1d543bcb61d4cf5972bf4ada96a4056d8 +DIST gitlab-runner-14.9.2.tar.gz 1260233 BLAKE2B 9632c01ce05375ccec038392c978eedb66287e48263347b73194d4cadab122822bdf6c1b5cdec324501c636e4fe68e65623aeae42b1d8bb34f38281142367da1 SHA512 2f3e5c729bd443fd4943c6521762155fd7b7848d3a64634947be5e8b8e31dd19765502d5abb604b872e1e1fc1fa35e05d49075122f7edeed82760ae53970de32 diff --git a/dev-util/gitlab-runner/gitlab-runner-14.10.1.ebuild b/dev-util/gitlab-runner/gitlab-runner-14.10.1.ebuild new file mode 100644 index 000000000000..d91c8bf83913 --- /dev/null +++ b/dev-util/gitlab-runner/gitlab-runner-14.10.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module systemd tmpfiles +GIT_COMMIT=c6bb62f6a + +DESCRIPTION="The official GitLab Runner, written in Go" +HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-runner" +SRC_URI="https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v${PV}/${PN}-v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +COMMON_DEPEND="acct-group/gitlab-runner + acct-user/gitlab-runner" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +BDEPEND="dev-go/gox" + +DOCS=( docs CHANGELOG.md README.md config.toml.example ) + +S="${WORKDIR}/${PN}-v${PV}" + +src_compile() { + emake \ + BUILT="$(date -u '+%Y-%m-%dT%H:%M:%S%:z')" \ + GOX="${EPREFIX}/usr/bin/gox" \ + REVISION=${GIT_COMMIT} \ + VERSION=${PV} \ + runner-bin-host +} + +src_test() { + CI=0 ego test +} + +src_install() { + dobin out/binaries/gitlab-runner + einstalldocs + + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf + keepdir /{etc,var/log}/${PN} + fowners gitlab-runner:gitlab-runner /{etc,var/log}/${PN} + fperms 0700 /{etc,var/log}/gitlab-runner +} + +pkg_postinst() { + tmpfiles_process gitlab-runner.conf + [[ -f ${EROOT}/etc/gitlab-runner/config.toml ]] && return + elog + elog "To use the runner, you need to register it with this command:" + elog "# gitlab-runner register" + elog "This will also create the configuration file in /etc/gitlab-runner/config.toml" +} diff --git a/dev-util/gitlab-runner/gitlab-runner-14.9.2.ebuild b/dev-util/gitlab-runner/gitlab-runner-14.9.2.ebuild new file mode 100644 index 000000000000..1ad7cc8d7ccd --- /dev/null +++ b/dev-util/gitlab-runner/gitlab-runner-14.9.2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module systemd tmpfiles +GIT_COMMIT=bd40e3da + +DESCRIPTION="The official GitLab Runner, written in Go" +HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-runner" +SRC_URI="https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v${PV}/${PN}-v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +COMMON_DEPEND="acct-group/gitlab-runner + acct-user/gitlab-runner" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +BDEPEND="dev-go/gox" + +DOCS=( docs CHANGELOG.md README.md config.toml.example ) + +S="${WORKDIR}/${PN}-v${PV}" + +src_compile() { + emake \ + BUILT="$(date -u '+%Y-%m-%dT%H:%M:%S%:z')" \ + GOX="${EPREFIX}/usr/bin/gox" \ + REVISION=${GIT_COMMIT} \ + VERSION=${PV} \ + runner-bin-host +} + +src_test() { + CI=0 ego test +} + +src_install() { + dobin out/binaries/gitlab-runner + einstalldocs + + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf + keepdir /{etc,var/log}/${PN} + fowners gitlab-runner:gitlab-runner /{etc,var/log}/${PN} + fperms 0700 /{etc,var/log}/gitlab-runner +} + +pkg_postinst() { + tmpfiles_process gitlab-runner.conf + [[ -f ${EROOT}/etc/gitlab-runner/config.toml ]] && return + elog + elog "To use the runner, you need to register it with this command:" + elog "# gitlab-runner register" + elog "This will also create the configuration file in /etc/gitlab-runner/config.toml" +} diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 17286070e712..ed368da79896 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -114,6 +114,8 @@ esac # # - setuptools - distutils or setuptools (incl. legacy mode) # +# - sip - sipbuild backend +# # - standalone - standalone build systems without external deps # (used for bootstrapping). # @@ -227,6 +229,10 @@ _distutils_set_globals() { >=dev-python/setuptools-60.5.0[${PYTHON_USEDEP}] dev-python/wheel[${PYTHON_USEDEP}]' ;; + sip) + bdep+=' + >=dev-python/sip-6.5.0-r1[${PYTHON_USEDEP}]' + ;; standalone) ;; *) @@ -388,8 +394,19 @@ unset -f _distutils_set_globals # @ECLASS_VARIABLE: DISTUTILS_ARGS # @DEFAULT_UNSET # @DESCRIPTION: -# An array containing options to be passed to setup.py. They are passed -# before the default arguments, i.e. before the first command. +# An array containing options to be passed to the build system. +# Supported by a subset of build systems used by the eclass. +# +# For setuptools, the arguments will be passed as first parameters +# to setup.py invocations (via esetup.py), as well as to the PEP517 +# backend. For future compatibility, only global options should be used +# and specifying commands should be avoided. +# +# For sip, the options are passed to the PEP517 backend in a form +# resembling sip-build calls. Options taking arguments need to +# be specified in the "--key=value" form, while flag options as "--key". +# If an option takes multiple arguments, it can be specified multiple +# times, same as for sip-build. # # Example: # @CODE @@ -920,6 +937,11 @@ _distutils-r1_print_package_versions() { dev-python/wheel ) ;; + sip) + packages+=( + dev-python/sip + ) + ;; esac else case ${DISTUTILS_USE_SETUPTOOLS} in @@ -1104,6 +1126,9 @@ _distutils-r1_backend_to_key() { setuptools.build_meta|setuptools.build_meta:__legacy__) echo setuptools ;; + sipbuild.api) + echo sip + ;; *) die "Unknown backend: ${backend}" ;; @@ -1202,6 +1227,30 @@ distutils_pep517_install() { EOF ) ;; + sip) + # NB: for practical reasons, we support only --foo=bar, + # not --foo bar + local arg + for arg in "${DISTUTILS_ARGS[@]}"; do + [[ ${arg} != -* ]] && + die "Bare arguments in DISTUTILS_ARGS unsupported: ${arg}" + done + + config_settings=$( + "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die + import collections + import json + import sys + + args = collections.defaultdict(list) + for arg in (x.split("=", 1) for x in sys.argv[1:]): \ + args[arg[0]].extend( + [arg[1]] if len(arg) > 1 else []) + + print(json.dumps(args)) + EOF + ) + ;; *) die "DISTUTILS_ARGS are not supported by ${DISTUTILS_USE_PEP517}" ;; @@ -1228,9 +1277,12 @@ distutils_pep517_install() { die "Wheel install failed" # remove installed licenses - find "${root}$(python_get_sitedir)" \ - '(' -path '*.dist-info/COPYING*' -o \ - -path '*.dist-info/LICENSE*' ')' -delete || die + find "${root}$(python_get_sitedir)" -depth \ + \( -path '*.dist-info/COPYING*' \ + -o -path '*.dist-info/LICENSE*' \ + -o -path '*.dist-info/license_files/*' \ + -o -path '*.dist-info/license_files' \ + \) -delete || die # clean the build tree; otherwise we may end up with PyPy3 # extensions duplicated into CPython dists diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 0d958828e163..67dc5bf754d6 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1299,6 +1299,9 @@ epytest() { -p no:flake8 -p no:flakes -p no:pylint + # sterilize pytest-markdown as it runs code snippets from all + # *.md files found without any warning + -p no:markdown ) local x for x in "${EPYTEST_DESELECT[@]}"; do diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass index 1f09cbd9ca77..a86ce1fbabb8 100644 --- a/eclass/qmake-utils.eclass +++ b/eclass/qmake-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: qmake-utils.eclass @@ -60,6 +60,33 @@ qt5_get_plugindir() { echo $(qt5_get_libdir)/qt5/plugins } +# @FUNCTION: qt5_get_qmake_args +# @DESCRIPTION: +# Echoes a multi-line string containing arguments to pass to qmake. +qt5_get_qmake_args() { + cat <<-EOF + QMAKE_AR="$(tc-getAR) cqs" + QMAKE_CC="$(tc-getCC)" + QMAKE_LINK_C="$(tc-getCC)" + QMAKE_LINK_C_SHLIB="$(tc-getCC)" + QMAKE_CXX="$(tc-getCXX)" + QMAKE_LINK="$(tc-getCXX)" + QMAKE_LINK_SHLIB="$(tc-getCXX)" + QMAKE_OBJCOPY="$(tc-getOBJCOPY)" + QMAKE_RANLIB= + QMAKE_STRIP= + QMAKE_CFLAGS="${CFLAGS}" + QMAKE_CFLAGS_RELEASE= + QMAKE_CFLAGS_DEBUG= + QMAKE_CXXFLAGS="${CXXFLAGS}" + QMAKE_CXXFLAGS_RELEASE= + QMAKE_CXXFLAGS_DEBUG= + QMAKE_LFLAGS="${LDFLAGS}" + QMAKE_LFLAGS_RELEASE= + QMAKE_LFLAGS_DEBUG= + EOF +} + # @FUNCTION: eqmake5 # @USAGE: [arguments for qmake] # @DESCRIPTION: @@ -75,28 +102,10 @@ eqmake5() { ebegin "Running qmake" - "$(qt5_get_bindir)"/qmake \ - -makefile \ - QMAKE_AR="$(tc-getAR) cqs" \ - QMAKE_CC="$(tc-getCC)" \ - QMAKE_LINK_C="$(tc-getCC)" \ - QMAKE_LINK_C_SHLIB="$(tc-getCC)" \ - QMAKE_CXX="$(tc-getCXX)" \ - QMAKE_LINK="$(tc-getCXX)" \ - QMAKE_LINK_SHLIB="$(tc-getCXX)" \ - QMAKE_OBJCOPY="$(tc-getOBJCOPY)" \ - QMAKE_RANLIB= \ - QMAKE_STRIP= \ - QMAKE_CFLAGS="${CFLAGS}" \ - QMAKE_CFLAGS_RELEASE= \ - QMAKE_CFLAGS_DEBUG= \ - QMAKE_CXXFLAGS="${CXXFLAGS}" \ - QMAKE_CXXFLAGS_RELEASE= \ - QMAKE_CXXFLAGS_DEBUG= \ - QMAKE_LFLAGS="${LDFLAGS}" \ - QMAKE_LFLAGS_RELEASE= \ - QMAKE_LFLAGS_DEBUG= \ - "$@" + local -a args + mapfile -t args <<<"$(qt5_get_qmake_args)" + # NB: we're passing literal quotes in but qmake doesn't seem to mind + "$(qt5_get_bindir)"/qmake -makefile "${args[@]}" "$@" if ! eend $? ; then echo |