-
Notifications
You must be signed in to change notification settings - Fork 778
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (140 loc) · 5.18 KB
/
pyproject.toml
File metadata and controls
167 lines (140 loc) · 5.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# FontForge Python Module - PyPI Package Configuration
[build-system]
requires = ["scikit-build-core>=0.5"]
build-backend = "scikit_build_core.build"
[project]
name = "fontforge"
dynamic = ["version"]
description = "A font editor and format converter library"
readme = "README_PYPI.md"
license = "GPL-3.0-or-later"
requires-python = ">=3.8"
authors = [
{ name = "FontForge Contributors" }
]
maintainers = [
{ name = "FontForge Contributors" }
]
keywords = [
"font",
"fonts",
"typography",
"opentype",
"truetype",
"type1",
"otf",
"ttf",
"woff",
"woff2",
"ufo",
"editor",
"converter",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: C",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Text Processing :: Fonts",
"Topic :: Multimedia :: Graphics :: Editors :: Vector-Based",
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
]
[project.urls]
Homepage = "https://fontforge.org"
Documentation = "https://fontforge.org/docs/scripting/python.html"
Repository = "https://github.com/fontforge/fontforge"
Issues = "https://github.com/fontforge/fontforge/issues"
Changelog = "https://github.com/fontforge/fontforge/releases"
[tool.scikit-build]
# Enable experimental features for custom version provider
experimental = true
# Get version from CMakeLists.txt (converts YYYYMMDD to CalVer YYYY.M.D)
metadata.version.provider = "version_provider"
metadata.version.provider-path = "_build_meta"
# CMake configuration for wheel builds
cmake.args = [
"-DENABLE_GUI=OFF",
"-DENABLE_PYTHON_SCRIPTING=ON",
"-DENABLE_PYTHON_EXTENSION=ON",
"-DENABLE_NATIVE_SCRIPTING=OFF",
"-DENABLE_DOCS=OFF",
"-DBUILD_SHARED_LIBS=ON",
]
# Build in Release mode for wheels
cmake.build-type = "Release"
# No pure Python packages - just the compiled extensions
wheel.packages = []
# Install extensions to the root of the wheel
wheel.install-dir = "."
# Minimum CMake version
cmake.version = ">=3.15"
[tool.scikit-build.cmake.define]
# These can be overridden via environment variables if needed
# ENABLE_LIBSPIRO = "ON"
# ENABLE_WOFF2 = "ON"
# ============================================================================
# cibuildwheel configuration
# ============================================================================
[tool.cibuildwheel]
# Skip PyPy, 32-bit builds, and musllinux
skip = ["pp*", "*-win32", "*-manylinux_i686", "*-musllinux*"]
# Test that the modules can be imported
test-command = "python -c \"import fontforge; import psMat; print('fontforge', fontforge.version())\""
# Build for these Python versions (uncomment to restrict)
# build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"]
[tool.cibuildwheel.linux]
# Use manylinux_2_28 (RHEL 8 based) for broader compatibility
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
# Install build dependencies (RHEL 8 / manylinux_2_28)
# Note: libspiro and libunibreak not in default repos, disabled for now
before-all = """
yum install -y \
freetype-devel \
libxml2-devel \
zlib-devel \
libpng-devel \
libjpeg-devel \
libtiff-devel \
brotli-devel
"""
# Repair wheels with auditwheel
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
[tool.cibuildwheel.macos]
# Build separate wheels for each architecture
archs = ["x86_64", "arm64"]
# arm64 requires macOS 11.0+, x86_64 can target 10.13
# Use 11.0 for both for simplicity
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
# Install build dependencies via Homebrew
# Note: Homebrew handles architecture automatically on native runners
before-all = "brew install freetype libxml2 libpng jpeg libtiff brotli"
# Repair wheels with delocate
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
[tool.cibuildwheel.windows]
# Build for 64-bit only
archs = ["AMD64"]
# Environment: point CMake to vcpkg toolchain
# GitHub Actions provides VCPKG_INSTALLATION_ROOT, but we install our own for consistency
environment = { CMAKE_TOOLCHAIN_FILE = "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" }
# Bootstrap vcpkg and install dependencies (bash syntax required by cibuildwheel)
before-all = """
test -d C:/vcpkg || git clone https://github.com/microsoft/vcpkg.git C:/vcpkg
C:/vcpkg/bootstrap-vcpkg.bat -disableMetrics
C:/vcpkg/vcpkg install freetype libxml2 libiconv zlib libpng libjpeg-turbo tiff --triplet x64-windows
"""
before-build = "pip install delvewheel"
# Repair wheels with delvewheel, adding vcpkg DLL path
repair-wheel-command = "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin -w {dest_dir} {wheel}"