diff --git a/meson.build b/meson.build new file mode 100644 index 00000000..274655e6 --- /dev/null +++ b/meson.build @@ -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'], +) diff --git a/pyproject.toml b/pyproject.toml index 33070ec7..9de9b910 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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