diff options
| author | Nicolas B. Pierron <nicolas.b.pierron@gmail.com> | 2016-10-31 15:16:29 +0000 |
|---|---|---|
| committer | Nicolas B. Pierron <nicolas.b.pierron@gmail.com> | 2016-10-31 15:16:29 +0000 |
| commit | 59b5bbeae91109007e36a269a94cccc865dc5175 (patch) | |
| tree | 1ee3d18aedace6d66034ea72fea571d20d8d0fee /doc/languages-frameworks/python.md | |
| parent | Do not use old stdenv version in faust wrap functions. (-8 alias, -15 unpatch... (diff) | |
| parent | Merge pull request #19675 from edwtjo/dictd-touchup (diff) | |
| download | nixpkgs-origin/security-updates.tar.gz | |
Merge branch master into security-updatesorigin/security-updatesgitlab.intr/security-updates
This merge mostly take the changes made to the master branch.
Some conflict happen in top-level/default.nix due to a reformating of the
code of which is computing the fix-point. This merge fixes these issues by
adding the pkgsIndex argument, needed to re-evaluate the fix-point with
another set of packages, and also re-add the second fix-point made to
support the dependencies.
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 |
