Skip to content

Commit 98af567

Browse files
authored
fix pip check for optional dependencies (#301)
1 parent 18a5065 commit 98af567

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.ci_support/check.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import tomlkit
2+
3+
4+
if __name__ == "__main__":
5+
with open("pyproject.toml", "r") as f:
6+
data = tomlkit.load(f)
7+
8+
lst = []
9+
for sub_lst in data["project"]["optional-dependencies"].values():
10+
for el in sub_lst:
11+
lst.append(el)
12+
13+
data["project"]["dependencies"] += list(set(lst))
14+
15+
with open("pyproject.toml", "w") as f:
16+
f.writelines(tomlkit.dumps(data))

.github/workflows/pipeline.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ jobs:
8383
- name: Setup
8484
shell: bash -l {0}
8585
run: |
86-
pip install versioneer[toml]==0.29
86+
pip install versioneer[toml]==0.29 tomlkit
87+
python .ci_support/check.py
88+
cat pyproject.toml
8789
pip install . --no-deps --no-build-isolation
8890
pip check
8991

0 commit comments

Comments
 (0)