# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

[package]
name = "slint-python"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
description = "Slint Python integration"
repository.workspace = true
homepage.workspace = true
publish = false
rust-version.workspace = true

[lib]
path = "lib.rs"
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "stub-gen"
path = "stub-gen/main.rs"

[features]
default = ["backend-winit", "renderer-femtovg", "renderer-software", "accessibility"]
# Keep in sync with features in nightly_snapshot.yaml, cpp_package.yaml, slint_tool_binary.yaml, and api/node/Cargo.toml
# binaries: default = ["backend-linuxkms-noseat", "backend-winit", "renderer-femtovg", "renderer-skia", "accessibility"]

backend-qt = ["slint-interpreter/backend-qt"]
backend-winit = ["slint-interpreter/backend-winit"]
backend-winit-x11 = ["slint-interpreter/backend-winit-x11"]
backend-winit-wayland = ["slint-interpreter/backend-winit-wayland"]
backend-linuxkms = ["slint-interpreter/backend-linuxkms"]
backend-linuxkms-noseat = ["slint-interpreter/backend-linuxkms-noseat"]
backend-testing = ["i-slint-backend-selector/backend-testing"]
renderer-femtovg = ["slint-interpreter/renderer-femtovg"]
renderer-femtovg-wgpu = ["slint-interpreter/renderer-femtovg-wgpu"]
renderer-skia = ["slint-interpreter/renderer-skia"]
renderer-skia-opengl = ["slint-interpreter/renderer-skia-opengl"]
renderer-skia-vulkan = ["slint-interpreter/renderer-skia-vulkan"]
renderer-software = ["slint-interpreter/renderer-software"]
accessibility = ["slint-interpreter/accessibility"]


[dependencies]
i-slint-backend-selector = { workspace = true }
i-slint-common = { workspace = true }
i-slint-core = { workspace = true, features = ["tr"] }
slint-interpreter = { workspace = true, features = ["default", "display-diagnostics", "internal", "internal-highlight"] }
i-slint-compiler = { workspace = true, features = ["python"] }
pyo3 = { version = "0.28", features = ["extension-module", "indexmap", "chrono", "abi3-py311"] }
indexmap = { version = "2.1.0" }
chrono = "0.4"
spin_on = { workspace = true }
css-color-parser2 = { workspace = true }
pyo3-stub-gen = { version = "0.18.0", default-features = false }
smol = { version = "2.0.0" }

[build-dependencies]
i-slint-common = { workspace = true }

[package.metadata.maturin]
python-source = "slint"
