Simon Hausmann
833883b028
Python: Fix Slint file loading in callback examples
...
The foo_slint import has been replaced with the auto-loader.
2024-08-11 10:27:18 +02:00
ogoffart
bbf7edc5a3
Bump version number to 1.7.2
2024-08-09 09:52:17 +00:00
Simon Hausmann
ef92c1a161
Python: reset alpha version tag
2024-07-23 15:16:30 +02:00
ogoffart
aa25e3cd44
Bump version number to 1.7.1
2024-07-23 12:05:34 +00:00
Simon Hausmann
e36eb6aba6
Document behaviour of globals when exporting multiple components
...
Fixes #5467
2024-07-18 13:43:13 +02:00
Simon Hausmann
6ddd4d0e04
Bump Python Alpha version
2024-07-17 11:32:19 +02:00
Simon Hausmann
e3aab79fdb
Python: Improve Struct mapping
...
When reading, create the local equivalent of a dataclass, so that access
doesn't require ["foo"] key syntax.
Also implement the copy protocol, so that we can safely make clones of
the references returned by the ListModel.
2024-07-11 22:08:10 +02:00
Simon Hausmann
0b6381d012
Python: Fix access to globals when there's more than one
...
The getter for the global didn't capture the correct global_class,
just the last iteration.
This fixes the broken printer demo.
2024-07-11 22:00:39 +02:00
Simon Hausmann
0c7d2062a5
Python: Add support for exporting multiple components
2024-07-02 10:52:22 +02:00
Simon Hausmann
624796d53e
Python: Make the timer test more robust
...
It seems that with the latest winit, quit_event_loop() might take a little longer and the timer fires once more. We don't really care how long quit_event_loop() takes in this test, merely that the timer firest and that we can terminate the loop.
Fixes #5484
2024-06-27 09:58:14 +02:00
Simon Hausmann
f3ed569592
Bump Python package alpha version
2024-06-21 20:17:18 +02:00
Simon Hausmann
3be6e641c6
Python: Attempt to build python packages with the same features as the nodejs/tool/etc. binaries
2024-06-18 09:43:37 -07:00
Simon Hausmann
b98035526b
Python: Add the ability to invoke functions declared in Slint from Python
2024-06-05 14:06:10 -07:00
Simon Hausmann
b9052ecf8a
Bump Python alpha tag
2024-06-05 11:00:25 -07:00
Simon Hausmann
e0c0e8d09c
Python: reset alpha version suffix
2024-06-04 13:59:49 -07:00
ogoffart
3a6e34ba45
Bump version number to 1.7.0
2024-06-04 20:34:29 +00:00
Tobias Hunger
d9224cd58f
janitor: Use more workspace dependencies
2024-06-04 14:58:29 +02:00
Aurindam Jana
3523e86359
Simplify commercial license ( #3063 )
...
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license ( #5257 )
...
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Simon Hausmann
9b00b31618
Python: bump version after alpha upload for seeking-feedback post
2024-05-03 08:07:53 +02:00
Simon Hausmann
f7c2e3a4c0
Python: bump alpha version so that next release will upload
2024-05-02 18:57:27 +02:00
Simon Hausmann
5cfd8e8c03
Fix Python build
2024-04-24 10:00:52 +02:00
Simon Hausmann
3c3b2ecb5a
doc: highlight the function of the auto-loader once more in the python README
2024-04-19 09:19:59 +02:00
Simon Hausmann
f86f4993fa
Python: Replace import magic with an auto-loader
...
As discussed on Reddit, the magic import logic is not very tool friendly and a little too magic perhaps. Instead, this patch introduces an automatic loader (`slint.loader`), which can traverse `sys.path` and lazily load `.slint` files by attribute lookup.
Closes #4856
2024-04-18 16:04:20 +02:00
Simon Hausmann
93307707cd
doc: Replace the use of a git pip install with an installation from pypi
2024-04-18 15:55:46 +02:00
Simon Hausmann
97940ee7b8
Python: Mention installation via pip and sort prerequisites
...
cc #4138
2024-04-18 13:44:20 +02:00
Simon Hausmann
382967603f
Python: Correct minimum Python version in published categories
...
Also removed console
2024-04-18 11:15:21 +02:00
Simon Hausmann
6408eaf0ad
Python: build against abi3 to support multiple Python versions
...
- Upgrade to pyo3 0.21 to enable timedelta for chrono
- Enable abi3 for multi-python support
2024-04-18 09:34:43 +02:00
Simon Hausmann
1cb57a4505
Python: Try to use maturin-action to build wheels
...
... to allow cross-compilation and manylinux packaging
2024-04-17 14:15:21 +02:00
Simon Hausmann
b5cde20255
Python: bump version for pypi upload
2024-04-17 09:14:21 +02:00
Simon Hausmann
e4017a3e41
Python: Some pre for PyPI uploads
...
- Add classifiers and other meta-data
- Add alpha suffix for version (to be kept until removed manually)
2024-04-16 17:44:37 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License ( #4994 )
...
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Olivier Goffart
fd4dcfc128
Update MSRV to 1.73
...
A MSRV update is required to update the image crate to 0.25, otherwise
we get link error that are ficed in newer version.
Also other dependency update such as env_logger needs a newer MSRV.
Update to 1.73 because it has functions like `with_borrow` on thread
storage which we already actually use in some platform.
This is also the last release before the the drop of macOs < 10.12
in Rust 1.74
2024-03-27 09:04:31 +01:00
ogoffart
6bf40989d9
Bump version number to 1.6.0
2024-03-27 07:49:22 +00:00
ogoffart
20c570ab1d
Bump version number to 1.5.1
2024-03-18 08:55:01 +00:00
Olivier Goffart
902de92229
Fix tests
...
The code snippet don't have a component and the test currently fails if there is no components.
2024-03-14 18:06:43 +01:00
Olivier Goffart
4dbdfa9e6a
Specify that code snippets uses the slint language
2024-03-14 17:41:30 +01:00
Simon Hausmann
b83ace4e6d
Python: Fix MSRV
2024-03-08 15:21:30 +01:00
Florian Blasius
2355234553
Fixed typo in python readme
2024-03-08 10:32:10 +01:00
Simon Hausmann
c1e8d7c07d
Python: Add missing write-back support for Models
...
Ooops :-)
2024-03-07 19:48:48 +01:00
Simon Hausmann
cc83784de5
Python: Remove link to milestone 1
...
Instead refer to the remaining tickets for now.
2024-03-07 17:51:00 +01:00
Simon Hausmann
2234878453
Python: Use kwargs passed to the instance constructors
...
And set properties, like in JavaScript.
2024-03-07 17:49:00 +01:00
Simon Hausmann
a3b7a6da50
Python: Beef up the README with an API overview and a quickstart
2024-03-07 17:38:36 +01:00
Simon Hausmann
6a6b70185f
From the Python README, refer to the printer demo instead of the tests.
2024-03-07 12:12:24 +01:00
Simon Hausmann
a93e2be393
Python: Add support for a @slint.callback decorator to conveniently associated callbacks with python methods
...
cc #4134
2024-03-07 12:00:08 +01:00
Simon Hausmann
3b7b2411b4
Python: Add support for dynamic imports
...
```python
import foo_slint
```
will now also look for `foo.slint`
2024-03-07 10:08:12 +01:00
Simon Hausmann
176aa4bf72
Python: Make it possible to construct a ListModel from an iterable
...
Makes for a more pythonic API :)
cc #4135
2024-03-07 08:55:37 +01:00
Simon Hausmann
c83615cfb1
Python: Improve diagnostics when invoking a callback fails
2024-03-07 08:33:45 +01:00
Simon Hausmann
bdab1050f0
Python: Fix setters getters for properties/callacks
...
Make sure to capture the global/callback/property name correctly in
the closures.
2024-03-06 18:55:59 +01:00
Simon Hausmann
a29cc4ddf2
Python: Don't panic when invoking a python callback fails
...
Instead, log a message and return.
2024-03-06 18:55:23 +01:00