0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Python docs: small fixes

This commit is contained in:
Frederik Rietdijk 2017-03-21 10:42:58 +01:00
parent b02ff8ebd2
commit ce6cd33c65

View file

@ -3,7 +3,7 @@
## User Guide ## User Guide
Several versions of Python are available on Nix as well as a high amount of Several versions of Python are available on Nix as well as a high amount of
packages. The default interpreter is CPython 3.5. packages. The default interpreter is CPython 2.7.
### Using Python ### Using Python
@ -131,7 +131,7 @@ specify some (optional) [meta information](http://nixos.org/nixpkgs/manual/#chap
The output of the function is a derivation, which is an attribute with the name The output of the function is a derivation, which is an attribute with the name
`toolz` of the set `pythonPackages`. Actually, sets are created for all interpreter versions, `toolz` of the set `pythonPackages`. Actually, sets are created for all interpreter versions,
so `python27Packages`, `python34Packages`, `python35Packages` and `pypyPackages`. so e.g. `python27Packages`, `python35Packages` and `pypyPackages`.
The above example works when you're directly working on The above example works when you're directly working on
`pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though, `pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though,
@ -422,8 +422,8 @@ and in this case the `python35` interpreter is automatically used.
### Interpreters ### Interpreters
Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are available as respectively Versions 2.7, 3.3, 3.4, 3.5 and 3.6 of the CPython interpreter are available as
`python26`, `python27`, `python33`, `python34` and `python35`. The PyPy interpreter respectively `python27`, `python33`, `python34`, `python35` and `python36`. The PyPy interpreter
is available as `pypy`. The aliases `python2` and `python3` correspond to respectively `python27` and is available as `pypy`. The aliases `python2` and `python3` correspond to respectively `python27` and
`python35`. The default interpreter, `python`, maps to `python2`. `python35`. The default interpreter, `python`, maps to `python2`.
The Nix expressions for the interpreters can be found in The Nix expressions for the interpreters can be found in
@ -472,6 +472,7 @@ sets are
* `pkgs.python33Packages` * `pkgs.python33Packages`
* `pkgs.python34Packages` * `pkgs.python34Packages`
* `pkgs.python35Packages` * `pkgs.python35Packages`
* `pkgs.python36Packages`
* `pkgs.pypyPackages` * `pkgs.pypyPackages`
and the aliases and the aliases
@ -674,8 +675,8 @@ deterministic bytecode. This has security implications and is relevant for
those using Python in a `nix-shell`. those using Python in a `nix-shell`.
When the environment variable `DETERMINISTIC_BUILD` is set, all bytecode will have timestamp 1. When the environment variable `DETERMINISTIC_BUILD` is set, all bytecode will have timestamp 1.
The `buildPythonPackage` function sets `DETERMINISTIC_BUILD` as well as The `buildPythonPackage` function sets `DETERMINISTIC_BUILD=1` and
[PYTHONHASHSEED](https://docs.python.org/3.5/using/cmdline.html#envvar-PYTHONHASHSEED). [PYTHONHASHSEED=0](https://docs.python.org/3.5/using/cmdline.html#envvar-PYTHONHASHSEED).
Both are also exported in `nix-shell`. Both are also exported in `nix-shell`.