# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{11..14} ) inherit distutils-r1 shell-completion 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" #TODO dev-python/requests[socks5] if proxy needed RDEPEND=" $(python_gen_cond_dep ' =dev-python/ajsonrpc-1.2*[${PYTHON_USEDEP}] =dev-python/bottle-0.13*[${PYTHON_USEDEP}] >=dev-python/click-8.2[${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/tabulate-0*[${PYTHON_USEDEP}] dev-python/twisted[${PYTHON_USEDEP}] dev-python/constantly[${PYTHON_USEDEP}] >=dev-python/pyelftools-0.30[${PYTHON_USEDEP}] =dev-python/starlette-0.21[${PYTHON_USEDEP}] =dev-python/uvicorn-0.19[${PYTHON_USEDEP}] "${T}"/pio.${s_type} || die done } src_install() { distutils-r1_src_install udev_dorules platformio/assets/system/99-platformio-udev.rules newbashcomp "${T}"/pio.bash pio newfishcomp "${T}"/pio.fish pio.fish newzshcomp "${T}"/pio.zsh _pio } pkg_postinst() { udev_reload } pkg_postrm() { udev_reload }