Skip to content

Commit

Permalink
fix pip check for optional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Feb 14, 2025
1 parent bd44ecc commit 8d66512
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .ci_support/check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import tomlkit


if __name__ == "__main__":
with open("pyproject.toml", "r") as f:
data = tomlkit.load(f)

lst = []
for sub_lst in data["project"]["optional-dependencies"].values():
for el in sub_lst:
lst.append(el)

data["project"]["dependencies"] += list(set(lst))

with open("pyproject.toml", "w") as f:
f.writelines(tomlkit.dumps(data))
4 changes: 3 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ jobs:
- name: Pip check
shell: bash -l {0}
run: |
pip install versioneer[toml]==0.29
pip install versioneer[toml]==0.29 tomlkit
python .ci_support/check.py
cat pyproject.toml
pip install . --no-deps --no-build-isolation
pip check
Expand Down

0 comments on commit 8d66512

Please sign in to comment.