@@ -9,13 +9,20 @@ Limitations
9
9
***********
10
10
11
11
12
- No data
13
- =======
12
+ Non-package data files
13
+ ======================
14
14
15
- Data, as installed by |install_data |_, is not supported. It is
16
- recommended to install data files alongside the Python modules that
17
- requires them, and use :py:mod: `importlib.resources ` (or the
18
- :py:mod: `importlib_resources ` backport) to access it.
15
+ It is possible to encapsulate arbitrary data files into Python
16
+ wheels. ``meson-python `` will add to the wheel any data file installed
17
+ into the Meson's ``{datadir} `` location, for example via Meson's
18
+ |install_data() |_ function. However, when the resulting wheel is
19
+ installed, these files are unpacked into a platform-specific location
20
+ and there is no supported facility to reliably find them at run time.
21
+
22
+ It is recommended to include data files than need to be accessible at
23
+ run-time inside the package alongside the Python code, and use
24
+ :mod: `importlib.resources ` (or the `importlib-resources `_ backport) to
25
+ access them.
19
26
20
27
21
28
Shared libraries on Windows
@@ -32,8 +39,8 @@ shared libraries and include the setup code to properly set the
32
39
library search path.
33
40
34
41
35
- .. _install_data : https://mesonbuild.com/Reference-manual_functions.html#install_data
42
+ .. _install_data() : https://mesonbuild.com/Reference-manual_functions.html#install_data
36
43
.. _importlib-resources : https://importlib-resources.readthedocs.io/en/latest/index.html
37
44
.. _delvewheel : https://github.com/adang1345/delvewheel
38
45
39
- .. |install_data | replace :: ``install_data ``
46
+ .. |install_data() | replace :: ``install_data() ``
0 commit comments