diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-12-30 14:49:10 +0100 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2021-03-13 13:11:50 +0100 |
commit | 9d03ff52229f36ff4b4e9d0ee2db4a46b90512bb (patch) | |
tree | 84395442f1491ca4af7cb580c9176a87ae8dc4fc /doc | |
parent | 1adc69d4aa89fae7868d522914b4fb200267a90e (diff) | |
download | nixlib-9d03ff52229f36ff4b4e9d0ee2db4a46b90512bb.tar nixlib-9d03ff52229f36ff4b4e9d0ee2db4a46b90512bb.tar.gz nixlib-9d03ff52229f36ff4b4e9d0ee2db4a46b90512bb.tar.bz2 nixlib-9d03ff52229f36ff4b4e9d0ee2db4a46b90512bb.tar.lz nixlib-9d03ff52229f36ff4b4e9d0ee2db4a46b90512bb.tar.xz nixlib-9d03ff52229f36ff4b4e9d0ee2db4a46b90512bb.tar.zst nixlib-9d03ff52229f36ff4b4e9d0ee2db4a46b90512bb.zip |
python: reproducible builds
Achieve reproducible builds of the interpreter. Note this meant disabling optimizations again.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/languages-frameworks/python.section.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index e569cdaa9357..ff039b5e6380 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -788,6 +788,23 @@ Each interpreter has the following attributes: - `executable`. Name of the interpreter executable, e.g. `python3.8`. - `pkgs`. Set of Python packages for that specific interpreter. The package set can be modified by overriding the interpreter and passing `packageOverrides`. +### Optimizations + +The Python interpreters are by default not build with optimizations enabled, because +the builds are in that case not reproducible. To enable optimizations, override the +interpreter of interest, e.g using + +``` +let + pkgs = import ./. {}; + mypython = pkgs.python3.override { + enableOptimizations = true; + reproducibleBuild = false; + self = mypython; + }; +in mypython +``` + ### Building packages and applications Python libraries and applications that use `setuptools` or |