Skip to content

Commit 4ef38a1

Browse files
feat: protecting deps installed on upper limits (#924)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent be1f3d3 commit 4ef38a1

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

doc/Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,31 @@ help:
1313

1414
.PHONY: help Makefile
1515

16+
.install-deps:
17+
@pip freeze | grep -q "sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi" && is_custom_sphinx_autoapi_installed="yes" || is_custom_sphinx_autoapi_installed="no"
18+
@if [ "$$is_custom_sphinx_autoapi_installed" != "yes" ]; then \
19+
pip uninstall --yes sphinx-autoapi; \
20+
pip install "sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable"; \
21+
fi
22+
1623
# Catch-all target: route all unknown targets to Sphinx using the new
1724
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18-
%: Makefile
25+
%: .install-deps Makefile
1926
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2027

21-
2228
# Customized clean due to examples gallery
23-
clean:
29+
clean: .install-deps
2430
rm -rf $(BUILDDIR)/*
2531
find . -type d -name "api" -exec rm -rf {} +
2632

2733
# Create PDF
28-
pdf:
34+
pdf: .install-deps
2935
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3036
cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
3137
(test -f $(BUILDDIR)/latex/*.pdf && echo pdf exists) || exit 1
3238

3339
# Build HTML files and generate examples as .py files
34-
html:
40+
html: .install-deps
3541
@$(SPHINXBUILD) -M linkcheck "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3642
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3743
cd $(BUILDDIR)/html/examples

pyproject.toml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ classifiers = [
2525

2626
dependencies = [
2727
"ansys-api-geometry==0.3.5",
28-
"ansys-tools-path>=0.3",
29-
"beartype>=0.11.0",
30-
"google-api-python-client>=1.7.11",
31-
"googleapis-common-protos>=1.52.0",
32-
"grpcio>=1.35.0",
33-
"grpcio-health-checking>=1.45.0",
34-
"numpy>=1.20.3",
35-
"Pint>=0.18",
36-
"protobuf>=3.20.2",
37-
"pyvista>=0.37.0",
38-
"scipy>=1.7.3",
39-
"six>=1.16.0",
40-
"vtk>=9",
28+
"ansys-tools-path>=0.3,<1",
29+
"beartype>=0.11.0,<1",
30+
"google-api-python-client>=1.7.11,<3",
31+
"googleapis-common-protos>=1.52.0,<2",
32+
"grpcio>=1.35.0,<2",
33+
"grpcio-health-checking>=1.45.0,<2",
34+
"numpy>=1.20.3,<2",
35+
"Pint>=0.18,<1",
36+
"protobuf>=3.20.2,<5",
37+
"pyvista>=0.37.0,<1",
38+
"scipy>=1.7.3,<2",
39+
"six>=1.16.0,<2",
40+
"vtk>=9,<10",
4141
]
4242

4343
[project.optional-dependencies]
4444
all = [
45-
"ansys-platform-instancemanagement>=1.0.3",
46-
"docker>=6.0.1",
45+
"ansys-platform-instancemanagement>=1.0.3,<2",
46+
"docker>=6.0.1,<8",
4747
"pyvista[trame]>=0.38.1,<0.42",
4848
]
4949
tests = [

0 commit comments

Comments
 (0)