diff options
Diffstat (limited to 'doc/languages-frameworks/python.md')
| -rw-r--r-- | doc/languages-frameworks/python.md | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md index e7dbe3bd7db0..127614a71b75 100644 --- a/doc/languages-frameworks/python.md +++ b/doc/languages-frameworks/python.md @@ -3,7 +3,7 @@ ## User Guide Several versions of Python are available on Nix as well as a high amount of -packages. The default interpreter is CPython 2.7. +packages. The default interpreter is CPython 3.5. ### Using Python @@ -409,36 +409,21 @@ and in this case the `python35` interpreter is automatically used. ### Interpreters -Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are available on -Nix and are available as `python26`, `python27`, `python33`, `python34` and -`python35`. The PyPy interpreter is also available as `pypy`. Currently, the -aliases `python` and `python3` correspond to respectively `python27` and -`python35`. The Nix expressions for the interpreters can be found in +Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are as respectively +`python26`, `python27`, `python33`, `python34` and `python35`. The PyPy interpreter +is available as `pypy`. The aliases `python2` and `python3` correspond to respectively `python27` and +`python35`. The default interpreter, `python`, maps to `python3`. +The Nix expressions for the interpreters can be found in `pkgs/development/interpreters/python`. - -#### Missing modules standard library - -The interpreters `python26` and `python27` do not include modules that -require external dependencies. This is done in order to reduce the closure size. -The following modules need to be added as `buildInput` explicitly: - -* `python.modules.bsddb` -* `python.modules.curses` -* `python.modules.curses_panel` -* `python.modules.crypt` -* `python.modules.gdbm` -* `python.modules.sqlite3` -* `python.modules.tkinter` -* `python.modules.readline` - -For convenience `python27Full` and `python26Full` are provided with all -modules included. - All packages depending on any Python interpreter get appended `out/{python.sitePackages}` to `$PYTHONPATH` if such directory exists. +#### Missing `tkinter` module standard library + +To reduce closure size the `Tkinter`/`tkinter` is available as a separate package, `pythonPackages.tkinter`. + #### Attributes on interpreters packages Each interpreter has the following attributes: @@ -448,7 +433,7 @@ Each interpreter has the following attributes: - `buildEnv`. Function to build python interpreter environments with extra packages bundled together. See section *python.buildEnv function* for usage and documentation. - `withPackages`. Simpler interface to `buildEnv`. See section *python.withPackages function* for usage and documentation. - `sitePackages`. Alias for `lib/${libPrefix}/site-packages`. -- `executable`. Name of the interpreter executable, ie `python3.4`. +- `executable`. Name of the interpreter executable, e.g. `python3.4`. ### Building packages and applications @@ -475,8 +460,9 @@ sets are and the aliases -* `pkgs.pythonPackages` pointing to `pkgs.python27Packages` +* `pkgs.python2Packages` pointing to `pkgs.python27Packages` * `pkgs.python3Packages` pointing to `pkgs.python35Packages` +* `pkgs.pythonPackages` pointing to `pkgs.python3Packages` #### `buildPythonPackage` function |
