dev-python/kicad-python: new package, add 0.5.0

Signed-off-by: Huang Rui <vowstar@gmail.com>
This commit is contained in:
Huang Rui
2025-12-03 17:20:29 +08:00
parent 97d026950d
commit fb9a3dc40a
3 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST kicad_python-0.5.0.tar.gz 198708 BLAKE2B 6a4e756289de711e633f3adc07e1aaaa6820dad9c5ec6d605bf96bdc0ea74ea622394e15078268c0d1c47b73f304f99b04cb77d86a673e441b7680b3893691d2 SHA512 7d4f0d005525e6a646df0e25fb59cf93a55f9ea072821062c0384a386c382b24f9ccad204f06bc52d4f90158eefb923692497470e0a43ee2947f1b2057a73779

View File

@@ -0,0 +1,37 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( python3_{10..14} )
inherit distutils-r1 pypi
DESCRIPTION="KiCad API Python Bindings for interacting with running KiCad sessions"
HOMEPAGE="https://gitlab.com/kicad/code/kicad-python https://pypi.org/project/kicad-python"
LICENSE="MIT"
SLOT=0
KEYWORDS="~amd64"
# Tests not included in PyPI sdist
RESTRICT="test"
RDEPEND="
>=dev-python/protobuf-5.29[${PYTHON_USEDEP}]
<dev-python/protobuf-6[${PYTHON_USEDEP}]
>=dev-python/pynng-0.8.0[${PYTHON_USEDEP}]
<dev-python/pynng-0.9.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
>=dev-python/typing-extensions-4.13.2[${PYTHON_USEDEP}]
' python3_{10..12})
"
BDEPEND="${RDEPEND}"
src_prepare() {
# Remove build script config from pyproject.toml
# The sdist already contains pre-generated protobuf files
sed -i '/\[tool.poetry.build\]/,/^$/d' pyproject.toml || die
rm -f setup.py build.py || die
distutils-r1_src_prepare
}

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>vowstar@gmail.com</email>
<name>Huang Rui</name>
</maintainer>
<upstream>
<remote-id type="gitlab">kicad/code/kicad-python</remote-id>
<remote-id type="pypi">kicad-python</remote-id>
<doc>https://docs.kicad.org/kicad-python-main/</doc>
<bugs-to>https://gitlab.com/kicad/code/kicad-python/-/issues</bugs-to>
</upstream>
<longdescription lang="en">
kicad-python is the official Python library for interacting with running
KiCad sessions through the IPC API. It enables development of scripts
and tools for electronic design automation workflows. The library requires
KiCad 9.0 or higher with the API server enabled in Preferences. Note that
the IPC API requires communication with a running instance of KiCad; it
is not possible to use kicad-python to manipulate KiCad design files
without KiCad running.
</longdescription>
<longdescription lang="zh">
kicad-python是用于通过IPC API与运行中的KiCad会话进行交互的官方Python库。
它支持开发用于电子设计自动化工作流程的脚本和工具。该库需要KiCad 9.0或更高版本,
并在首选项中启用API服务器。请注意IPC API需要与正在运行的KiCad实例通信
如果没有运行KiCad则无法使用kicad-python操作KiCad设计文件。
</longdescription>
</pkgmetadata>