From a2054e7ebd328555aec621fb925cbefec03b98bb Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 13 Dec 2022 20:18:46 +0100 Subject: [PATCH] Add boilerplate --- .gitignore | 4 +++- Cargo.toml | 1 + api/python/Cargo.toml | 30 ++++++++++++++++++++++++++++++ api/python/lib.rs | 9 +++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 api/python/Cargo.toml create mode 100644 api/python/lib.rs diff --git a/.gitignore b/.gitignore index 533141bba..e6d4bb5dc 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ docs/reference/src/language/builtins/enums.md docs/reference/src/language/builtins/structs.md *.node -*.d.ts \ No newline at end of file +*.d.ts + +.env diff --git a/Cargo.toml b/Cargo.toml index 3e189d773..0eb2678bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ members = [ 'api/rs/build', 'api/rs/macros', 'api/rs/slint', + 'api/python', 'api/wasm-interpreter', 'docs/tutorial/rust/src', 'examples/7guis', diff --git a/api/python/Cargo.toml b/api/python/Cargo.toml new file mode 100644 index 000000000..b2d1ed016 --- /dev/null +++ b/api/python/Cargo.toml @@ -0,0 +1,30 @@ +# Copyright © SixtyFPS GmbH +# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial + +[package] +name = "pyslint" +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] +name = "slint" +path = "lib.rs" +crate-type = ["cdylib"] + +[dependencies] +i-slint-backend-selector = { version = "=1.4.0", path="../../internal/backends/selector" } +i-slint-backend-testing = { version = "=1.4.0", path="../../internal/backends/testing", optional = true } +i-slint-renderer-skia = { version = "=1.4.0", path="../../internal/renderers/skia", optional = true, features = ["x11", "wayland"] } +i-slint-core = { version = "=1.4.0", path="../../internal/core", features = ["ffi"] } +slint-interpreter = { workspace = true, features = ["default", "display-diagnostics", "internal"] } +pyo3 = { version = "0.20.0", features = ["extension-module", "indexmap"] } + +[build-dependencies] +i-slint-common = { version = "=1.4.0", path="../../internal/common" } diff --git a/api/python/lib.rs b/api/python/lib.rs new file mode 100644 index 000000000..6edf6dcf3 --- /dev/null +++ b/api/python/lib.rs @@ -0,0 +1,9 @@ +// Copyright © SixtyFPS GmbH +// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial + +use pyo3::prelude::*; + +#[pymodule] +fn slint(_py: Python<'_>, m: &PyModule) -> PyResult<()> { + Ok(()) +}