| 1 |
# Python 3 module |
| 2 |
|
| 3 |
This module provides support for dealing with Python 3. It has the |
| 4 |
following methods. |
| 5 |
|
| 6 |
This module is deprecated and replaced by the |
| 7 |
[python](Python-module.md) module. |
| 8 |
|
| 9 |
## find_python |
| 10 |
|
| 11 |
This is a cross platform way of finding the Python 3 executable, which |
| 12 |
may have a different name on different operating systems. Returns an |
| 13 |
[[@external_program]] |
| 14 |
object. |
| 15 |
|
| 16 |
*Added 0.38.0* |
| 17 |
|
| 18 |
Deprecated, replaced by |
| 19 |
[`find_installation`](Python-module.md#find_installation) function |
| 20 |
from `python` module. |
| 21 |
|
| 22 |
## extension_module |
| 23 |
|
| 24 |
Creates a `shared_module` target that is named according to the naming |
| 25 |
conventions of the target platform. All positional and keyword |
| 26 |
arguments are the same as for |
| 27 |
[[shared_module]]. |
| 28 |
|
| 29 |
`extension_module` does not add any dependencies to the library so user may |
| 30 |
need to add `dependencies : dependency('python3')`, see |
| 31 |
[Python3 dependency](Dependencies.md#python3). |
| 32 |
|
| 33 |
*Added 0.38.0* |
| 34 |
|
| 35 |
Deprecated, replaced by |
| 36 |
[`extension_module`](Python-module.md#extension_module) method from |
| 37 |
`python` module. |
| 38 |
|
| 39 |
## language_version |
| 40 |
|
| 41 |
Returns a string with the Python language version such as `3.5`. |
| 42 |
|
| 43 |
*Added 0.40.0* |
| 44 |
|
| 45 |
Deprecated, replaced by |
| 46 |
[`language_version`](Python-module.md#language_version) method from |
| 47 |
`python` module. |
| 48 |
|
| 49 |
## sysconfig_path |
| 50 |
|
| 51 |
Returns the Python sysconfig path without prefix, such as |
| 52 |
`lib/python3.6/site-packages`. |
| 53 |
|
| 54 |
*Added 0.40.0* |
| 55 |
|
| 56 |
Deprecated, replaced by [`get_path`](Python-module.md#get_path) |
| 57 |
method from `python` module. |