parent
5316c7df62
commit
329d111709
10 changed files with 78 additions and 10 deletions
@ -0,0 +1,12 @@ |
|||||||
|
## Override python installation paths |
||||||
|
|
||||||
|
The `python` module now has options to control where modules are installed: |
||||||
|
- python.platlibdir: Directory for site-specific, platform-specific files. |
||||||
|
- python.purelibdir: Directory for site-specific, non-platform-specific files. |
||||||
|
|
||||||
|
Those options are used by python module methods `python.install_sources()` and |
||||||
|
`python.get_install_dir()`. By default Meson tries to detect the correct installation |
||||||
|
path, but make them relative to the installation `prefix`, which will often result |
||||||
|
in installed python modules to not be found by the interpreter unless `prefix` |
||||||
|
is `/usr` on Linux, or for example `C:\Python39` on Windows. These new options |
||||||
|
can be absolute paths outside of `prefix`. |
@ -0,0 +1,10 @@ |
|||||||
|
project('install path', |
||||||
|
default_options: [ |
||||||
|
'python.purelibdir=/pure', |
||||||
|
'python.platlibdir=/plat' |
||||||
|
] |
||||||
|
) |
||||||
|
|
||||||
|
py = import('python').find_installation() |
||||||
|
py.install_sources('test.py') |
||||||
|
py.install_sources('test.py', pure: false) |
@ -0,0 +1,6 @@ |
|||||||
|
{ |
||||||
|
"installed": [ |
||||||
|
{"type": "file", "file": "plat/test.py"}, |
||||||
|
{"type": "file", "file": "pure/test.py"} |
||||||
|
] |
||||||
|
} |
Loading…
Reference in new issue