Skip to content

Commit 9ffb045

Browse files
authored
Merge pull request skia-python#341 from HinTak/v138.0-release
V138.0 release
2 parents 17a97a0 + c637ef7 commit 9ffb045

8 files changed

Lines changed: 64 additions & 67 deletions

File tree

.github/workflows/build_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
# installing libegl1 will also install libegl-mesa0
2424
sudo apt-get -y install libegl1
2525
python -m pip install --pre skia-python
26-
python -m pip install sphinx==6.2.1 sphinx-rtd-theme
27-
python setup.py build_sphinx
26+
python -m pip install sphinx sphinx-rtd-theme
27+
sphinx-build -b html docs docs/_build/html
2828
2929
- name: Deploy docs
3030
uses: peaceiris/actions-gh-pages@v3

.github/workflows/ci.yml

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
- os: ubuntu-22.04-arm
2626
arch: aarch64
2727
cp: "cp3{10,11,12,13}"
28+
- os: windows-11-arm
29+
arch: ARM64
30+
cp: "cp3{11,12,13}"
2831

2932
steps:
3033
- uses: actions/checkout@v4
@@ -56,45 +59,6 @@ jobs:
5659
name: wheel-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cp }}
5760
path: ./wheelhouse/*.whl
5861

59-
build_wheels_armwindows:
60-
name: Build wheels on ${{ matrix.os }} (${{ matrix.arch }}) for ${{ matrix.cp }}
61-
runs-on: ${{ matrix.os }}
62-
strategy:
63-
fail-fast: false
64-
matrix:
65-
os: [windows-11-arm]
66-
arch: [ARM64]
67-
cp: ["cp3{11,12,13}"]
68-
69-
steps:
70-
- uses: actions/checkout@v4
71-
with:
72-
submodules: true
73-
74-
- name: Build wheels
75-
uses: pypa/cibuildwheel@v2.21.3
76-
env:
77-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
78-
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
79-
CIBW_BUILD: "${{ matrix.cp }}-*"
80-
CIBW_SKIP: "*musllinux*"
81-
CIBW_ARCHS: ${{ matrix.arch }}
82-
CIBW_ENVIRONMENT_MACOS: TARGET_ARCH=${{ matrix.arch }} MACOSX_DEPLOYMENT_TARGET=11.0
83-
CIBW_BEFORE_ALL: bash scripts/build_${{ runner.os }}.sh
84-
CIBW_BEFORE_BUILD: pip install pybind11 numpy
85-
CIBW_BEFORE_BUILD_WINDOWS: pip install pybind11 "numpy >= 2.3.0rc1"
86-
CIBW_TEST_REQUIRES: pytest pillow glfw
87-
CIBW_TEST_REQUIRES_MACOS: pytest pillow pyopengl
88-
CIBW_TEST_COMMAND: python -m pytest {project}/tests
89-
CIBW_TEST_COMMAND_LINUX: >
90-
xvfb-run -s "-screen 0 640x480x24" python -m pytest {project}/tests
91-
CIBW_TEST_SKIP: "*-macosx_arm64"
92-
93-
- uses: actions/upload-artifact@v4
94-
with:
95-
name: wheel-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cp }}
96-
path: ./wheelhouse/*.whl
97-
9862
# identical to "build_wheels", except with the older pypa/cibuildwheel@v2.19.2
9963
build_wheels_old:
10064
name: Build wheels on ${{ matrix.os }} (${{ matrix.arch }}) for ${{ matrix.cp }}
@@ -104,14 +68,14 @@ jobs:
10468
matrix:
10569
os: [ubuntu-22.04, windows-2022, macos-13]
10670
arch: [auto64]
107-
cp: ["cp39"]
71+
cp: ["cp3{8,9}"]
10872
include:
10973
- os: macos-13
11074
arch: arm64
111-
cp: "cp39"
75+
cp: "cp3{8,9}"
11276
- os: ubuntu-22.04-arm
11377
arch: aarch64
114-
cp: "cp39"
78+
cp: "cp3{8,9}"
11579

11680
steps:
11781
- uses: actions/checkout@v4
@@ -145,7 +109,7 @@ jobs:
145109

146110
build_docs:
147111
name: Build docs
148-
needs: [build_wheels, build_wheels_armwindows, build_wheels_old]
112+
needs: [build_wheels, build_wheels_old]
149113
runs-on: ubuntu-latest
150114
steps:
151115
- uses: actions/checkout@v4
@@ -165,8 +129,8 @@ jobs:
165129
# installing libegl1 will also install libegl-mesa0
166130
sudo apt-get -y install libegl1
167131
python -m pip install --pre -f dist skia-python
168-
python -m pip install sphinx==6.2.1 sphinx-rtd-theme
169-
python setup.py build_sphinx
132+
python -m pip install sphinx sphinx-rtd-theme
133+
sphinx-build -b html docs docs/_build/html
170134
171135
- name: Deploy docs
172136
if: github.event_name == 'release' && github.event.action == 'published'
@@ -177,7 +141,7 @@ jobs:
177141

178142
publish:
179143
name: Upload packages to PyPI
180-
needs: [build_wheels, build_wheels_armwindows, build_wheels_old]
144+
needs: [build_wheels, build_wheels_old]
181145
runs-on: ubuntu-latest
182146
if: github.event_name == 'release' && github.event.action == 'published'
183147
permissions:

Migration_from_v8x_to_v13x.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
v13x offers a lot of new functionality. This document covers breaking changes
2+
when upgrading from v8x.
3+
4+
- Linux users: `libEGL.so` (from mesa-libEGL, libglvnd, or your graphic
5+
card's vendor e.g. NVidia) is required to be present on Linux hosts.
6+
This is associated with the general change on Linux from X11 to Wayland,
7+
and from GTK3 to GTK4.
8+
9+
- Apple users and non-open-source GPU driver: Upstream added subtantial
10+
GPU/driver detection code. You may need to request compatible OpenGL
11+
profile to match your GPU/driver's capability. For Apple Mac users,
12+
with `glfw`, adds the following:
13+
14+
```
15+
# see https://www.glfw.org/faq#macos
16+
glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
17+
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 2)
18+
glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, True)
19+
glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
20+
```
21+
22+
Other examples are in [README.m116](relnotes/README.m116.md).
23+
24+
# General
25+
26+
- Some routines need a new `skia.SamplingOptions()` argument, or
27+
switch from `skia.FilterQuality` to `skia.SamplingOptions()`.
28+
See [README.m124](relnotes/README.m124.md) for migration from
29+
`skia.FilterQuality`.
30+
31+
- `Typeface()` and `Typeface.MakeDefault()` now emit a Deprecation Warning.
32+
Use `Typeface("")` instead. Also avoid `skia.Font()` and
33+
`skia.Font(None, ...)` ; e.g. `skia.Font(skia.Typeface(''))` should be used.
34+
See [README.m121](relnotes/README.m121.md)
35+
36+
- A fair number of `skia.ImageFilter.*Filter` and `skia.*PathEffect` are
37+
gone. Sorry. Upstream likely recommends reimplementation with `skia.RuntimeEffect`.
38+
Please file issues, or better, pulls to emulate those old APIs. TODO
39+
40+
- Misc small changes everywhere.

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Supported platforms: Python 3.8-3.13 (CPython) on
2121
- macOS x86_64, arm64
2222
- Windows x86_64, arm64 ; arm64 for the windows 11 and Python 3.11-3.13 combination only.
2323

24-
**IMPORTANT:** Starting v138rc1, `libEGL.so` (from mesa-libEGL, libglvnd, or your graphic
24+
**IMPORTANT:** Starting v87.9rc1 / v138.0rc1, `libEGL.so` (from mesa-libEGL, libglvnd, or your graphic
2525
card's vendor e.g. NVidia) is required to be present on Linux hosts. This is associated
2626
with the general change on Linux from X11 to Wayland, and from GTK3 to GTK4. Firefox started
2727
to use it in 2021 (instead of the older `libGLX.so`), so it is likely newer Linux systems
28-
already have it, but please check. skia-python v138.rc1+ supports hardware acceleration
28+
already have it, but please check. skia-python v87.9 / v138.0+ supports hardware acceleration
2929
via both GLX (still the default under X11) and EGL (newly added).
3030

3131
For Linux platforms, there must be OpenGL, libEGL and fontconfig installed.
@@ -63,7 +63,10 @@ https://kyamagu.github.io/skia-python
6363
- [Tutorial](https://kyamagu.github.io/skia-python/tutorial/)
6464
- [Reference](https://kyamagu.github.io/skia-python/reference.html)
6565

66-
- For information about changes after `m116`, and tips on migration from `m87`: [README.m116](relnotes/README.m116.md),
66+
- For breaking changes and tips on migration from `m87`: See [Migration Guide](Migration_from_v8x_to_v13x.md), also
67+
see the detailed changes below, especially [README.m116](relnotes/README.m116.md).
68+
69+
- For information about changes after `m116`: [README.m116](relnotes/README.m116.md),
6770
[README.m117](relnotes/README.m117.md), [README.m118](relnotes/README.m118.md), [README.m119](relnotes/README.m119.md),
6871
[README.m120](relnotes/README.m120.md), [README.m121](relnotes/README.m121.md), [README.m122](relnotes/README.m122.md),
6972
[README.m123](relnotes/README.m123.md), [README.m124](relnotes/README.m124.md), [README.m125](relnotes/README.m125.md),

relnotes/README.m116.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ of this update had taken from.
4545
detection code in upsteam Skia between m87 and m116, to optimize for speed and
4646
work-around driver bugs. If you use a non-open-source GPU driver, i.e.
4747
everybody except Mesa on Linux, and especially Apple Mac users,
48-
you may need to request compatible OpenGL profile to match the your
48+
you may need to request compatible OpenGL profile to match your
4949
GPU/driver's capability. For Apple Mac users, with `glfw`, adds the following:
5050

5151
```

setup.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
pass
1313

1414
NAME = 'skia-python'
15-
__version__ = '138.0rc1'
15+
__version__ = '138.0'
1616

1717
SKIA_PATH = os.getenv('SKIA_PATH', 'skia')
1818
SKIA_OUT_PATH = os.getenv(
@@ -178,21 +178,11 @@ def build_extensions(self):
178178
ext_modules=[extension],
179179
data_files=data_files,
180180
install_requires=[
181-
'numpy; sys_platform != "win32" or python_version <= "3.10"',
182-
'numpy>=2.3.0rc1; sys_platform == "win32" and python_version >= "3.11"',
181+
'numpy',
183182
'pybind11>=2.6'
184183
],
185184
setup_requires=['pybind11>=2.6'],
186185
cmdclass={'build_ext': BuildExt},
187-
command_options={
188-
'build_sphinx': {
189-
'project': ('setup.py', NAME),
190-
'version': ('setup.py', __version__),
191-
'release': ('setup.py', __version__),
192-
'source_dir': ('setup.py', 'docs'),
193-
'build_dir': ('setup.py', 'docs/_build'),
194-
},
195-
},
196186
classifiers=[
197187
'Development Status :: 4 - Beta',
198188
'Intended Audience :: Developers',

src/skia/GrContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ py::class_<GrDirectContext, sk_sp<GrDirectContext>, GrRecordingContext>(m, "GrDi
956956
957957
The client should ensure that the returned backend texture is valid.
958958
For the Vulkan backend the layout of the created VkImage will be:
959-
VK_IMAGE_LAYOUT_UNDEFINED.
959+
VK_IMAGE_LAYOUT_UNDEFINED .
960960
)docstring",
961961
py::arg("width"), py::arg("height"), py::arg("backendFormat"),
962962
py::arg("mipMapped"), py::arg("renderable"),
@@ -996,7 +996,7 @@ py::class_<GrDirectContext, sk_sp<GrDirectContext>, GrRecordingContext>(m, "GrDi
996996
The finishedProc will always get called even if we failed to create the
997997
GrBackendTexture.
998998
For the Vulkan backend the layout of the created VkImage will be:
999-
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
999+
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL .
10001000
)docstring",
10011001
py::arg("width"), py::arg("height"), py::arg("backendFormat"),
10021002
py::arg("color"), py::arg("mipMapped"), py::arg("renderable"),

src/skia/RuntimeEffect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ py::class_<SkRuntimeEffectBuilder> runtime_effect_builder(m, "RuntimeEffectBuild
2424

2525
py::enum_<SkRuntimeEffect::ChildType>(runtime_effect, "ChildType")
2626
.value("kShader", SkRuntimeEffect::ChildType::kShader)
27-
.value("kColorFilter,", SkRuntimeEffect::ChildType::kColorFilter)
27+
.value("kColorFilter", SkRuntimeEffect::ChildType::kColorFilter)
2828
.value("kBlender", SkRuntimeEffect::ChildType::kBlender)
2929
.export_values();
3030

0 commit comments

Comments
 (0)