Merge pull request #1648 from deemp/fix-checkgroups

Fix checkgroups
This commit is contained in:
Phillip Cloud 2024-05-08 11:02:06 -04:00 committed by GitHub
commit 3df9d21b3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View file

@ -148,7 +148,7 @@ Creates a Python application using the Python interpreter specified based on the
- **python**: The Python interpreter to use (_default:_ `pkgs.python3`).
- **preferWheels** : Use wheels rather than sdist as much as possible (_default_: `false`).
- **groups**: Which Poetry 1.2.0+ dependency groups to install (_default_: `[ ]`).
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to run unit tests (_default_: `[ "dev" ]`).
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to install (independently of **groups**) to run unit tests (_default_: `[ "dev" ]`).
- **extras**: Which Poetry `extras` to install (_default_: `[ "*" ]`, all extras).
Other attributes are passed through to `buildPythonApplication`.
@ -206,7 +206,7 @@ Creates an environment that provides a Python interpreter along with all depende
- **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`).
- **groups**: Which Poetry 1.2.0+ dependency groups to install (_default_: `[ "dev" ]`).
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to run unit tests (_default_: `[ "dev" ]`).
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to install (independently of **groups**) to run unit tests (_default_: `[ "dev" ]`).
- **extras**: Which Poetry `extras` to install (_default_: `[ "*" ]`, all extras).
#### Example
@ -278,7 +278,7 @@ Creates an attribute set of the shape `{ python, poetryPackages, pyProject, poet
- **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`).
- **groups**: Which Poetry 1.2.0+ dependency groups to install (_default_: `[ ]`).
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to run unit tests (_default_: `[ "dev" ]`).
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to install (independently of **groups**) to run unit tests (_default_: `[ "dev" ]`).
- **extras**: Which Poetry `extras` to install (_default_: `[ "*" ]`, all extras).
#### Example

View file

@ -24,13 +24,15 @@ let
knownBuildSystems = lib.importJSON ./known-build-systems.json;
nixpkgsBuildSystems = lib.subtractLists [ "poetry" "poetry-core" ] knownBuildSystems;
checkGroupsDefault = [ "dev" ];
mkInputAttrs =
{ py
, pyProject
, attrs
, includeBuildSystem ? true
, groups ? [ ]
, checkGroups ? [ "dev" ]
, checkGroups ? checkGroupsDefault
, extras ? [ "*" ] # * means all extras, otherwise include the dependencies for a given extra
}:
let
@ -144,7 +146,7 @@ lib.makeScope pkgs.newScope (self: {
, editablePackageSources ? { }
, pyProject ? readTOML pyproject
, groups ? [ ]
, checkGroups ? [ "dev" ]
, checkGroups ? checkGroupsDefault
, extras ? [ "*" ]
}:
let
@ -311,7 +313,7 @@ lib.makeScope pkgs.newScope (self: {
, editablePackageSources ? { }
, extraPackages ? _ps: [ ]
, groups ? [ "dev" ]
, checkGroups ? [ "dev" ]
, checkGroups ? checkGroupsDefault
, extras ? [ "*" ]
}:
let
@ -377,7 +379,7 @@ lib.makeScope pkgs.newScope (self: {
, pwd ? projectDir
, preferWheels ? false
, groups ? [ ]
, checkGroups ? [ "dev" ]
, checkGroups ? checkGroupsDefault
, extras ? [ "*" ]
, ...
}@attrs: