Skip to content

Commit

Permalink
Play with meson
Browse files Browse the repository at this point in the history
  • Loading branch information
madig committed Jan 21, 2023
1 parent 1312091 commit 4c51514
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
25 changes: 25 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
project('foo', 'cython', 'cpp')

py = import('python').find_installation()
dep_py = py.dependency()

harfbuzz_includes = include_directories('harfbuzz/src')
harfbuzz = static_library(
'harfbuzz',
'harfbuzz/src/harfbuzz-subset.cc',
'harfbuzz/src/hb-coretext.cc',
'harfbuzz/src/hb-directwrite.cc',
'harfbuzz/src/hb-uniscribe.cc',
cpp_args: '-DHB_NO_MT=1 -DHB_EXPERIMENTAL_API=1',
include_directories: harfbuzz_includes,
)

py.extension_module(
'uharfbuzz',
'src/uharfbuzz/_harfbuzz.pyx',
dependencies: dep_py,
include_directories: harfbuzz_includes,
install: true,
link_with: [harfbuzz],
override_options: ['cython_language=cpp'],
)
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
[build-system]
build-backend = "mesonpy"
requires = [
"setuptools >= 36.4",
"wheel",
"meson-python",
"setuptools_scm >= 2.1",
"cython >= 0.28.1",
]
build-backend = "setuptools.build_meta"

[project]
name = "uharfbuzz"
version = "0.0.1"

[tool.cibuildwheel]
# only build for 64-bit
Expand Down

0 comments on commit 4c51514

Please sign in to comment.