Skip to content

Commit 706b00b

Browse files
author
mscheltienne
committed
parse extra-dependencies keys from metadata
1 parent edcf214 commit 706b00b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ following steps are required:
1818
- [ ] Enable `pre-commit.ci` on https://pre-commit.ci/
1919
- [ ] Edit `README.md`
2020
- [ ] Edit `MANIFEST.in`
21-
- [ ] Edit the keys to list in the system information in `template/utils/config.py`
2221
- [ ] Edit the package import in `tools/stubgen.py`
2322
- [ ] Remove the conda-forge recipe from the ignored files in ``.yamllint.yaml``
2423

template/utils/config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import platform
44
import sys
55
from functools import lru_cache, partial
6-
from importlib.metadata import requires, version
6+
from importlib.metadata import metadata, requires, version
77
from typing import TYPE_CHECKING
88

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

5858
# extras
5959
if developer:
60-
keys = (
61-
"build",
62-
"doc",
63-
"test",
64-
"stubs",
65-
"style",
60+
keys = sorted(
61+
[
62+
elt
63+
for elt in metadata(package).get_all("Provides-Extra")
64+
if elt not in ("all", "full")
65+
]
6666
)
6767
for key in keys:
6868
extra_dependencies = [

0 commit comments

Comments
 (0)