Skip to content

Commit

Permalink
parse extra-dependencies keys from metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mscheltienne committed Aug 16, 2024
1 parent edcf214 commit 706b00b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ following steps are required:
- [ ] Enable `pre-commit.ci` on https://pre-commit.ci/
- [ ] Edit `README.md`
- [ ] Edit `MANIFEST.in`
- [ ] Edit the keys to list in the system information in `template/utils/config.py`
- [ ] Edit the package import in `tools/stubgen.py`
- [ ] Remove the conda-forge recipe from the ignored files in ``.yamllint.yaml``

Expand Down
14 changes: 7 additions & 7 deletions template/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import platform
import sys
from functools import lru_cache, partial
from importlib.metadata import requires, version
from importlib.metadata import metadata, requires, version
from typing import TYPE_CHECKING

import psutil
Expand Down Expand Up @@ -57,12 +57,12 @@ def sys_info(fid: Optional[IO] = None, developer: bool = False):

# extras
if developer:
keys = (
"build",
"doc",
"test",
"stubs",
"style",
keys = sorted(
[
elt
for elt in metadata(package).get_all("Provides-Extra")
if elt not in ("all", "full")
]
)
for key in keys:
extra_dependencies = [
Expand Down

0 comments on commit 706b00b

Please sign in to comment.