python313Packages.kicad-python: init at 0.4.0
This commit is contained in:
parent
2032eb4942
commit
833f9f9c2e
70
pkgs/development/python-modules/kicad-python/default.nix
Normal file
70
pkgs/development/python-modules/kicad-python/default.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitLab,
|
||||
poetry-core,
|
||||
protoletariat,
|
||||
mypy-protobuf,
|
||||
pkgs,
|
||||
protobuf,
|
||||
pynng,
|
||||
pytestCheckHook,
|
||||
gitMinimal,
|
||||
pythonOlder,
|
||||
typing-extensions,
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "kicad-python";
|
||||
version = "0.4.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "kicad/code";
|
||||
repo = "kicad-python";
|
||||
tag = version;
|
||||
hash = "sha256-M2vJ/lSwc1XjrG661ayNIOZKJitmy/UPM2SesQI1xYE=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
protoletariat
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
protobuf
|
||||
pynng
|
||||
mypy-protobuf
|
||||
]
|
||||
++ (lib.optional (pythonOlder "3.13") typing-extensions);
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.protobuf
|
||||
mypy-protobuf
|
||||
gitMinimal
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [ "protobuf" ];
|
||||
|
||||
# fixes: FileExistsError: File already exists .../kipy/__init__.py
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'script =' "#"
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
python build.py
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "kipy" ];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
meta = {
|
||||
description = "KiCad API Python Bindings";
|
||||
homepage = "https://kicad.org/";
|
||||
downloadPage = "https://gitlab.com/kicad/code/kicad-python";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ sigmanificient ];
|
||||
};
|
||||
}
|
||||
@ -7737,6 +7737,8 @@ self: super: with self; {
|
||||
|
||||
kicad = toPythonModule (pkgs.kicad.override { python3 = python; }).src;
|
||||
|
||||
kicad-python = callPackage ../development/python-modules/kicad-python { };
|
||||
|
||||
kicadcliwrapper = callPackage ../development/python-modules/kicadcliwrapper { };
|
||||
|
||||
kinparse = callPackage ../development/python-modules/kinparse { };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user