From a6b9ecc7735b0d5c09359c5d61f4c0626a636350 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Fri, 25 Jul 2025 09:46:52 -0400 Subject: [PATCH] platformio: fork for python 3.13 and bump --- dev-embedded/platformio/Manifest | 1 + dev-embedded/platformio/metadata.xml | 7 ++ .../platformio/platformio-6.1.18.ebuild | 117 ++++++++++++++++++ .../base/package.use/python3_13_transition | 1 - 4 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 dev-embedded/platformio/Manifest create mode 100644 dev-embedded/platformio/metadata.xml create mode 100644 dev-embedded/platformio/platformio-6.1.18.ebuild delete mode 100644 profiles/pentoo/base/package.use/python3_13_transition diff --git a/dev-embedded/platformio/Manifest b/dev-embedded/platformio/Manifest new file mode 100644 index 000000000..2e85b23a2 --- /dev/null +++ b/dev-embedded/platformio/Manifest @@ -0,0 +1 @@ +DIST platformio-6.1.18.gh.tar.gz 302134 BLAKE2B 53674e73bba37ad3559395954ce07b79a072221b7c31ec08af17cc276a2625905f84ca808b9b7f0e9f8cbc0c6b1e3297bc9a4e2ef9e6ac44a3d88bb8e7d90f46 SHA512 920db6f85951801f77a313d32a80cbe62b03509c057c74daa1167009f2b1d218e9cadaadbe9b3b8931dcbf03aa047c617757856e6d9a8db9db3379c1ae764872 diff --git a/dev-embedded/platformio/metadata.xml b/dev-embedded/platformio/metadata.xml new file mode 100644 index 000000000..bcc82e12a --- /dev/null +++ b/dev-embedded/platformio/metadata.xml @@ -0,0 +1,7 @@ + + + + + platformio/platformio-core + + diff --git a/dev-embedded/platformio/platformio-6.1.18.ebuild b/dev-embedded/platformio/platformio-6.1.18.ebuild new file mode 100644 index 000000000..0823a00fc --- /dev/null +++ b/dev-embedded/platformio/platformio-6.1.18.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..13} ) + +inherit distutils-r1 udev + +DESCRIPTION="An open source ecosystem for IoT development" +HOMEPAGE="https://platformio.org/" +SRC_URI="https://github.com/platformio/platformio-core/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}"/${PN}-core-${PV} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + $(python_gen_cond_dep ' + >=dev-python/aiofiles-22.1[${PYTHON_USEDEP}] + dev-python/ajsonrpc[${PYTHON_USEDEP}] + =dev-python/pyserial-3[${PYTHON_USEDEP}] + =dev-python/zeroconf-0.37[${PYTHON_USEDEP}] + =dev-python/requests-2*[${PYTHON_USEDEP}] + >=dev-python/semantic-version-2.10[${PYTHON_USEDEP}] + =dev-python/pyelftools-0.30[${PYTHON_USEDEP}] + =dev-python/starlette-0.21[${PYTHON_USEDEP}] + >=dev-python/uvicorn-0.19[${PYTHON_USEDEP}] + dev-python/wsproto[${PYTHON_USEDEP}] + ') + virtual/udev" +DEPEND="virtual/udev" +BDEPEND="test? ( $(python_gen_cond_dep 'dev-python/jsondiff[${PYTHON_USEDEP}]') )" + +# This list could be refined a bit to have individual tests which need network +# (within EPYTEST_DESELECT) but so many need it that it doesn't seem worth it right now. +EPYTEST_IGNORE=( + # Requires network access + tests/test_builder.py + tests/package/test_manager.py + tests/package/test_manifest.py + tests/commands/test_platform.py + tests/commands/test_test.py + tests/commands/test_ci.py + tests/commands/test_init.py + tests/commands/test_lib.py + tests/commands/test_lib_complex.py + tests/commands/test_boards.py + tests/commands/test_check.py + tests/commands/test_run.py + tests/commands/pkg/test_exec.py + tests/commands/pkg/test_list.py + tests/commands/pkg/test_outdated.py + tests/commands/pkg/test_search.py + tests/commands/pkg/test_show.py + tests/commands/pkg/test_install.py + tests/commands/pkg/test_uninstall.py + tests/commands/pkg/test_update.py + tests/misc/ino2cpp/test_ino2cpp.py + tests/test_maintenance.py + tests/test_misc.py +) + +EPYTEST_DESELECT=( + # Requires network access + tests/misc/test_maintenance.py::test_check_pio_upgrade + tests/misc/test_misc.py::test_ping_internet_ips + tests/misc/test_misc.py::test_api_cache +) + +distutils_enable_tests pytest + +python_prepare_all() { + # Allow newer versions of: + # - zeroconf, bug #831181. + # - wsproto + # - semantic_version, bug #853247 + # - starlette & uvicorn, bug #888427 + sed \ + -e '/zeroconf/s/<[0-9.*]*//' \ + -e '/wsproto/s/==.*/"/' \ + -e '/semantic_version/s/==[0-9.*]*//' \ + -e '/starlette/s/==.*/"/' \ + -e '/uvicorn/s/==.*/"/' \ + -i setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + epytest -k "not skip_ci" +} + +src_install() { + distutils-r1_src_install + udev_dorules platformio/assets/system/99-platformio-udev.rules +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/profiles/pentoo/base/package.use/python3_13_transition b/profiles/pentoo/base/package.use/python3_13_transition deleted file mode 100644 index b1e6394cb..000000000 --- a/profiles/pentoo/base/package.use/python3_13_transition +++ /dev/null @@ -1 +0,0 @@ -dev-embedded/platformio python_single_target_python3_12