Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7c963cd
large-scale refactor, change of build system + draft of compact new api
behackl Feb 14, 2026
5508dd3
update docs to match draft api
behackl Feb 14, 2026
d7ce5bf
update and cleanup workflow files + packaging scripts
behackl Feb 15, 2026
705eb17
also run wheel build workflow
behackl Feb 15, 2026
ecb4b91
attempt fixing test + wheel build pipeline
behackl Feb 15, 2026
23b3f7e
re-enable actions for current branch
behackl Feb 15, 2026
18a042e
src layout + required updates
behackl Feb 15, 2026
381ad8c
fix more bugs in ci workflow + tests
behackl Feb 15, 2026
5856a42
fix two flaky tests; fix bug with font cache
behackl Feb 15, 2026
d318e98
mark variable font test as xfail on windows too
behackl Feb 15, 2026
750920f
add no-build-isolation to make uv + meson work together smoother
behackl Feb 15, 2026
cb64a44
feat: establish v1 rendering and font backend
behackl Aug 4, 2026
6dc067e
ci: modernize validation workflows
behackl Aug 4, 2026
f36a0c7
fix: bootstrap CI and refresh Windows fonts
behackl Aug 4, 2026
d846189
ci: skip native build in lint
behackl Aug 4, 2026
171d453
fix: load private fonts into Windows Pango map
behackl Aug 4, 2026
bc07078
ci: replace legacy linters with Ruff
behackl Aug 4, 2026
3bb9eef
fix: use renderer-owned Pango font maps
behackl Aug 4, 2026
3a4ea1c
fix: type managed font map boundary
behackl Aug 4, 2026
5759a93
fix: keep Pango font maps in renderer
behackl Aug 4, 2026
ca30044
refactor: stream SVG rendering in memory
behackl Aug 4, 2026
2e4f2ef
build: harden v1 prerelease packaging
behackl Aug 4, 2026
ed3aac4
style: satisfy artifact checker lint
behackl Aug 4, 2026
4a4801b
fix: verify artifacts without shell globs
behackl Aug 4, 2026
a16e7c2
chore: remove legacy v0 tooling and declarations
behackl Aug 4, 2026
f1ca48a
ci: upgrade core actions to node 24
behackl Aug 4, 2026
d0929e3
ci: replace unmaintained MSVC setup action
behackl Aug 4, 2026
1226025
ci: upgrade artifact actions to node 24
behackl Aug 4, 2026
64d9ff1
fix: reuse renderer font map snapshots
behackl Aug 4, 2026
8b1a247
fix: clarify v1 rendering contracts
behackl Aug 4, 2026
78886b4
docs: document the v1 API and release notes
behackl Aug 4, 2026
740b8a5
docs: consolidate v1 migration into changelog
behackl Aug 4, 2026
7490e0b
docs: introduce RenderedText in quickstart
behackl Aug 4, 2026
3108603
docs: show RenderedText output
behackl Aug 4, 2026
0fd12df
feat: add concise RenderedText representation
behackl Aug 4, 2026
5416be3
chore: modernize documentation and release tooling
behackl Aug 4, 2026
f2a3b0f
fix: align styles with Pango slants
behackl Aug 4, 2026
8aee57b
test: verify bundled wheel linkage
behackl Aug 4, 2026
72c15f2
test: update variable font backend coverage
behackl Aug 4, 2026
be90334
fix: validate static wheel linkage
behackl Aug 4, 2026
673a853
docs: clarify variable font rendering support
behackl Aug 4, 2026
26a00f5
fix: disable contextual programming ligatures
behackl Aug 4, 2026
0df2636
fix: preserve svg size and line metadata semantics
behackl Aug 4, 2026
ae878ad
ci: publish packages from github releases
behackl Aug 4, 2026
127a229
fix: reject unsafe text inputs
behackl Aug 4, 2026
db78b83
fix: harden text and font ownership
behackl Aug 4, 2026
a8a40f0
fix: isolate linux fontconfig state
behackl Aug 4, 2026
760f250
perf: normalize spans with an event sweep
behackl Aug 4, 2026
f4ccbbd
perf: compute line offsets in one pass
behackl Aug 4, 2026
cb42911
docs: clarify prerelease and platform installs
behackl Aug 4, 2026
a0414bb
fix: prepare markup once per render
behackl Aug 4, 2026
27bcffc
docs: describe prerelease installs generically
behackl Aug 4, 2026
e431d39
Merge branch 'v0' into rewrite-v2
behackl Aug 4, 2026
7538944
fix(docs): build native extension on read the docs
behackl Aug 4, 2026
6a19c02
ci: run pull request checks against v0
behackl Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .codecov.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .coveragerc

This file was deleted.

2 changes: 0 additions & 2 deletions .flake8

This file was deleted.

231 changes: 72 additions & 159 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,223 +2,136 @@ name: Build Wheels

on:
push:
branches:
- main
- fix-wheel-build
- v*
branches: [main, rewrite-v2]
pull_request:
branches: [main, v0, rewrite-v2]
release:
types: [created]
types: [published]

jobs:
build_wheels:
name: Build Wheels on ${{ matrix.os }}-${{ matrix.platform_id }}
build-wheels:
name: Wheels / ${{ matrix.os }} (${{ matrix.platform_id }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Run 32 and 64 bit version in parallel for Windows
- os: windows-2022
- os: windows-latest
platform_id: win_amd64
architecture: x64
- os: windows-2022
platform_id: win32
architecture: x86
- os: macos-13
platform_id: macosx_x86_64
architecture: x64
- os: macos-14
- os: macos-latest
platform_id: macosx_arm64
architecture: arm64
env:
CIBW_BUILD: cp39-${{ matrix.platform_id }} cp310-${{ matrix.platform_id }} cp311-${{ matrix.platform_id }} cp312-${{ matrix.platform_id }} cp313-${{ matrix.platform_id }} cp314-${{ matrix.platform_id }}
CIBW_SKIP: pp* cp38*
CIBW_BEFORE_BUILD_MACOS: "python packing/download_pango_macos.py ${{ matrix.architecture }}"
CIBW_BEFORE_BUILD_WINDOWS: "python packing/download_dlls.py"
CIBW_ENVIRONMENT_WINDOWS: "PKG_CONFIG_PATH='C:\\cibw\\vendor\\lib\\pkgconfig'"
CIBW_ENVIRONMENT_MACOS: "PKG_CONFIG_PATH='/Users/runner/pangobuild/lib/pkgconfig' MACOSX_DEPLOYMENT_TARGET='10.13'"
CIBW_TEST_REQUIRES: pytest pytest-cov
CIBW_TEST_COMMAND: "bash {project}/packing/test_wheels.sh {project}"
steps:
- uses: actions/checkout@v4
- name: Set Path for pkg-config
if: runner.os == 'windows'
run: |
$env:Path = "C:\cibw\pkg-config\bin;C:\cibw\vendor\bin;$($env:PATH)"
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Build wheels (Windows)
if: runner.os == 'windows'
shell: pwsh
run: |
Copy-Item packing/LICENSE.bin .
Rename-Item LICENSE.bin LICENSE.win32

- name: Build wheels (Non-Windows)
if: runner.os != 'windows'
run: |
cp packing/LICENSE.bin .

- name: Build wheels
uses: pypa/cibuildwheel@v3.2.1
env:
PKG_CONFIG_PATH: "C:\\cibw\\vendor\\lib\\pkgconfig"

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: wheels-${{ runner.os }}-${{ matrix.platform_id }}
- os: macos-15-intel
platform_id: macosx_x86_64
architecture: x64

test_wheels_win:
name: Test wheels on Windows - ${{ matrix.platform_id }} (${{ matrix.python-version }})
needs: [build_wheels]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
architecture: [x64, x86]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
include: [
{platform_id: win_amd64, architecture: x64},
{platform_id: win32, architecture: x86},
]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
allow-prereleases: true
- uses: actions/checkout@v6

- uses: actions/download-artifact@v4
# Windows: set up MSVC so meson doesn't pick up MinGW, then
# download Pango binaries and put pkg-config on PATH.
- uses: TheMrMilchmann/setup-msvc-dev@v4
if: runner.os == 'Windows'
with:
name: wheels-${{ runner.os }}-${{ matrix.platform_id }}
path: ~/wheelhouse

- name: Install test dependencies
run: |
pip install pytest pytest-cov
arch: x64

- name: Install wheels
run: |
pip install --no-index --find-links ~/wheelhouse ManimPango
- name: Download Pango binaries (Windows)
if: runner.os == 'Windows'
run: python packing/download_dlls.py

- name: Run tests
- name: Configure vendor paths (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
bash packing/test_wheels.sh $(pwd)

test_wheels_mac:
name: Test wheels on macOS - ${{ matrix.platform_id }} (${{ matrix.python-version }})
needs: [build_wheels]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
architecture: [x64, arm64]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
include: [
{platform_id: macosx_x86_64, architecture: x64, os: macos-13},
{platform_id: macosx_arm64, architecture: arm64, os: macos-14},
]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture == 'arm64' && null || matrix.architecture }}
allow-prereleases: true
printf '%s\n' 'C:\cibw\vendor\bin' >> "$GITHUB_PATH"
printf '%s\n' 'PKG_CONFIG_PATH=C:\cibw\vendor\lib\pkgconfig' >> "$GITHUB_ENV"

- uses: actions/download-artifact@v4
- name: Build wheels
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_BUILD: >-
cp311-${{ matrix.platform_id }}
cp312-${{ matrix.platform_id }}
cp313-${{ matrix.platform_id }}
cp314-${{ matrix.platform_id }}
CIBW_BEFORE_BUILD_MACOS: "python {project}/packing/download_pango_macos.py ${{ matrix.architecture }}"
CIBW_ENVIRONMENT_MACOS: >-
PKG_CONFIG_PATH='/Users/runner/pangobuild/lib/pkgconfig'
MACOSX_DEPLOYMENT_TARGET='11.0'
# This smoke test clears build-time vendor paths before importing the
# wheel, so a passing test proves the repaired wheel is self-contained.
CIBW_TEST_COMMAND: "python {project}/packing/test_wheels.py"

- name: Verify wheel notices
run: python packing/check_artifacts.py wheelhouse

- uses: actions/upload-artifact@v7
with:
name: wheels-${{ runner.os }}-${{ matrix.platform_id }}
path: ~/wheelhouse

- name: Install test dependencies
run: |
pip install pytest pytest-cov

- name: Install wheels
run: |
pip install --no-index --find-links ~/wheelhouse ManimPango

- name: Run tests
shell: bash
run: |
bash packing/test_wheels.sh $(pwd)
name: wheels-${{ matrix.os }}-${{ matrix.platform_id }}
path: ./wheelhouse/*.whl

build_sdist:
build-sdist:
name: Source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup Python
uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.12"

- name: Install dependencies
- name: Install system dependencies
run: |
sudo apt install libcairo2-dev pkg-config python3-dev
sudo apt-get install libpango1.0-dev
python -m pip install --upgrade build
sudo apt-get update
sudo apt-get install -y libpango1.0-dev libcairo2-dev pkg-config

- name: Build sdist
run: python -m build --sdist
run: |
python -m pip install --upgrade pip build twine
python -m build --sdist
python -m twine check dist/*
python packing/check_artifacts.py dist

- name: Test sdist
run: |
python -m pip install dist/*.tar.gz
cd "$(mktemp -d)"
python -c 'import manimpango; result = manimpango.render("sdist smoke test"); assert result.svg and result.width > 0 and result.height > 0'

- name: Store artifacts
uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: sdist
path: dist/*.tar.gz
name: manimpango-src

publish:
needs: [test_wheels_mac, test_wheels_win, build_sdist]
name: Upload wheels to PyPI
name: Publish to PyPI
needs: [build-wheels, build-sdist]
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/ManimPango
permissions:
id-token: write
contents: write
if: github.event_name== 'release'
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
path: downloads/
path: artifacts/

- name: Move files to dist
- name: Collect dist files
run: |
mkdir -p dist/
find downloads/ -name \*.whl -exec cp {} dist \;
find downloads/ -name \*.tar.gz -exec cp {} dist \;
find artifacts/ -name '*.whl' -exec cp {} dist/ \;
find artifacts/ -name '*.tar.gz' -exec cp {} dist/ \;

- name: Publish package distributions to PyPI
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- name: Release
- name: Attach assets to GitHub release
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: false
files: |
dist/*.whl
dist/*.tar.gz

success:
needs: [test_wheels_win, test_wheels_mac]
runs-on: ubuntu-latest
name: Building and testing of wheels success
steps:
- name: Success
run: echo "Building and testing of wheels success"
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Documentation

on:
push:
branches: [main, rewrite-v2]
pull_request:
branches: [main, v0, rewrite-v2]

concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-python@v6
with:
python-version: "3.13"

- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libpango1.0-dev libcairo2-dev pkg-config

- name: Install locked documentation dependencies
run: uv sync --locked --only-group docs

- name: Install editable project without build isolation
run: uv pip install --no-build-isolation --editable .

- name: Build documentation strictly
run: uv run --no-sync sphinx-build -W --keep-going -b html docs docs/_build/html

- name: Run documentation doctests
run: uv run --no-sync sphinx-build -W --keep-going -b doctest docs docs/_build/doctest
Loading
Loading