summaryrefslogtreecommitdiff
path: root/dev-python/kicad-python
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/kicad-python')
-rw-r--r--dev-python/kicad-python/Manifest1
-rw-r--r--dev-python/kicad-python/kicad-python-0.5.0.ebuild37
-rw-r--r--dev-python/kicad-python/metadata.xml28
3 files changed, 66 insertions, 0 deletions
diff --git a/dev-python/kicad-python/Manifest b/dev-python/kicad-python/Manifest
new file mode 100644
index 000000000000..e32ced13f190
--- /dev/null
+++ b/dev-python/kicad-python/Manifest
@@ -0,0 +1 @@
+DIST kicad_python-0.5.0.tar.gz 198708 BLAKE2B 6a4e756289de711e633f3adc07e1aaaa6820dad9c5ec6d605bf96bdc0ea74ea622394e15078268c0d1c47b73f304f99b04cb77d86a673e441b7680b3893691d2 SHA512 7d4f0d005525e6a646df0e25fb59cf93a55f9ea072821062c0384a386c382b24f9ccad204f06bc52d4f90158eefb923692497470e0a43ee2947f1b2057a73779
diff --git a/dev-python/kicad-python/kicad-python-0.5.0.ebuild b/dev-python/kicad-python/kicad-python-0.5.0.ebuild
new file mode 100644
index 000000000000..98cdac326f5d
--- /dev/null
+++ b/dev-python/kicad-python/kicad-python-0.5.0.ebuild
@@ -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
+}
diff --git a/dev-python/kicad-python/metadata.xml b/dev-python/kicad-python/metadata.xml
new file mode 100644
index 000000000000..719c1cf0f530
--- /dev/null
+++ b/dev-python/kicad-python/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>vowstar@gmail.com</email>
+ <name>Huang Rui</name>
+ </maintainer>
+ <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>
+ <upstream>
+ <bugs-to>https://gitlab.com/kicad/code/kicad-python/-/issues</bugs-to>
+ <doc>https://docs.kicad.org/kicad-python-main/</doc>
+ </upstream>
+ <origin>gentoo-guru-overlay</origin>
+</pkgmetadata> \ No newline at end of file