1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

meson: Initial commit

This commit is contained in:
Vincent Torri
2024-04-04 12:14:46 +02:00
committed by Nick Wellnhofer
parent 650f842dbe
commit 5732ce56f3
23 changed files with 1647 additions and 9 deletions

View File

@@ -10,7 +10,8 @@ EXTRA_DIST = \
generator.py \
libxml.py \
libxml2-python-api.xml \
pyproject.toml
pyproject.toml \
meson.build
if WITH_PYTHON
AM_CPPFLAGS = \

36
python/meson.build Normal file
View File

@@ -0,0 +1,36 @@
pymod = import('python')
py = pymod.find_installation('python3', required: false)
if py.found() == true
r = run_command(py, 'generator.py', meson.current_source_dir(), check: true)
libxml2mod_src = ['libxml.c', 'libxml2-py.c', 'types.c']
message(py.get_install_dir())
py.extension_module(
'libxml2mod',
files(libxml2mod_src),
dependencies: [py.dependency(), xml_dep],
include_directories: [config_dir],
install: true,
)
setup_py = configuration_data()
setup_py.set('prefix', get_option('prefix'))
setup_py.set('LIBXML_VERSION', meson.project_version())
setup_py.set('WITH_ICONV', want_iconv.to_int())
setup_py.set('WITH_ICU', want_icu.to_int())
setup_py.set('WITH_LZMA', want_lzma.to_int())
setup_py.set('WITH_ZLIB', want_zlib.to_int())
setup_py.set('WITH_THREADS', want_threads.to_int())
configure_file(
input: 'setup.py.in',
output: 'setup.py',
configuration: setup_py,
)
subdir('tests')
endif

View File

@@ -75,3 +75,5 @@ check-local:
fi ; \
done)
endif
EXTRA_DIST = meson.build

63
python/tests/meson.build Normal file
View File

@@ -0,0 +1,63 @@
python_test_files = files(
'attribs.py',
'build.py',
'compareNodes.py',
'ctxterror.py',
'cutnpaste.py',
'dtdvalid.py',
'error.py',
'inbuf.py',
'indexes.py',
'input_callback.py',
'nsdel.py',
'outbuf.py',
'push.py',
'pushSAX.py',
'pushSAXhtml.py',
'reader.py',
'reader2.py',
'reader3.py',
'reader4.py',
'reader5.py',
'reader6.py',
'reader7.py',
'reader8.py',
'readererr.py',
'readernext.py',
'regexp.py',
'relaxng.py',
'resolver.py',
'schema.py',
'serialize.py',
'setup_test.py',
'sync.py',
'thread2.py',
'tst.py',
'tstLastError.py',
'tstURI.py',
'tstmem.py',
'tstxpath.py',
'validDTD.py',
'validRNG.py',
'validSchemas.py',
'validate.py',
'walker.py',
'xpath.py',
'xpathext.py',
'xpathleak.py',
'xpathns.py',
'xpathret.py',
)
xml_files = files(
'invalid.xml',
'test.dtd',
'tst.xml',
'valid.xml',
)
install_data(
[python_test_files, xml_files, files('setup_test.py')],
install_dir: dir_doc / 'python' / 'examples',
)