Document preferWheels parameter

I realize that people do not know of `preferWheels` and here is a simple attempt to document it.
This commit is contained in:
Ryan Lahfa 2022-04-19 00:53:54 +02:00 committed by GitHub
parent 32263bebfe
commit c13ba70208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,7 @@ Creates a Python application using the Python interpreter specified based on the
- **overrides**: Python overrides to apply (_default_: `[defaultPoetryOverrides]`). - **overrides**: Python overrides to apply (_default_: `[defaultPoetryOverrides]`).
- **meta**: application [meta](https://nixos.org/nixpkgs/manual/#chap-meta) data (_default:_ `{}`). - **meta**: application [meta](https://nixos.org/nixpkgs/manual/#chap-meta) data (_default:_ `{}`).
- **python**: The Python interpreter to use (_default:_ `pkgs.python3`). - **python**: The Python interpreter to use (_default:_ `pkgs.python3`).
- **preferWheels** : Use wheels rather than sdist as much as possible (_default_: `false`).
Other attributes are passed through to `buildPythonApplication`. Other attributes are passed through to `buildPythonApplication`.
@ -85,6 +86,7 @@ Creates an environment that provides a Python interpreter along with all depende
- **python**: The Python interpreter to use (_default:_ `pkgs.python3`). - **python**: The Python interpreter to use (_default:_ `pkgs.python3`).
- **editablePackageSources**: A mapping from package name to source directory, these will be installed in editable mode. Note that path dependencies with `develop = true` will be installed in editable mode unless explicitly passed to `editablePackageSources` as `null`. (_default:_ `{}`). - **editablePackageSources**: A mapping from package name to source directory, these will be installed in editable mode. Note that path dependencies with `develop = true` will be installed in editable mode unless explicitly passed to `editablePackageSources` as `null`. (_default:_ `{}`).
- **extraPackages**: A function taking a Python package set and returning a list of extra packages to include in the environment. This is intended for packages deliberately not added to `pyproject.toml` that you still want to include. An example of such a package may be `pip`. (_default:_ `(ps: [ ])`). - **extraPackages**: A function taking a Python package set and returning a list of extra packages to include in the environment. This is intended for packages deliberately not added to `pyproject.toml` that you still want to include. An example of such a package may be `pip`. (_default:_ `(ps: [ ])`).
- **preferWheels** : Use wheels rather than sdist as much as possible (_default_: `false`).
#### Example #### Example
```nix ```nix
@ -147,6 +149,7 @@ Creates an attribute set of the shape `{ python, poetryPackages, pyProject, poet
- **overrides**: Python overrides to apply (_default_: `[defaultPoetryOverrides]`). - **overrides**: Python overrides to apply (_default_: `[defaultPoetryOverrides]`).
- **python**: The Python interpreter to use (_default:_ `pkgs.python3`). - **python**: The Python interpreter to use (_default:_ `pkgs.python3`).
- **editablePackageSources**: A mapping from package name to source directory, these will be installed in editable mode (_default:_ `{}`). - **editablePackageSources**: A mapping from package name to source directory, these will be installed in editable mode (_default:_ `{}`).
- **preferWheels** : Use wheels rather than sdist as much as possible (_default_: `false`).
#### Example #### Example
```nix ```nix