diff --git a/doc/Makefile b/doc/Makefile index dbe0fce38d..fa57f863f9 100755 --- a/doc/Makefile +++ b/doc/Makefile @@ -13,25 +13,31 @@ help: .PHONY: help Makefile +.install-deps: + @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" + @if [ "$$is_custom_sphinx_autoapi_installed" != "yes" ]; then \ + pip uninstall --yes sphinx-autoapi; \ + pip install "sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable"; \ + fi + # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile +%: .install-deps Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - # Customized clean due to examples gallery -clean: +clean: .install-deps rm -rf $(BUILDDIR)/* find . -type d -name "api" -exec rm -rf {} + # Create PDF -pdf: +pdf: .install-deps @$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true (test -f $(BUILDDIR)/latex/*.pdf && echo pdf exists) || exit 1 # Build HTML files and generate examples as .py files -html: +html: .install-deps @$(SPHINXBUILD) -M linkcheck "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) cd $(BUILDDIR)/html/examples diff --git a/pyproject.toml b/pyproject.toml index 69fbf01350..6f196dfdce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,25 +25,25 @@ classifiers = [ dependencies = [ "ansys-api-geometry==0.3.5", - "ansys-tools-path>=0.3", - "beartype>=0.11.0", - "google-api-python-client>=1.7.11", - "googleapis-common-protos>=1.52.0", - "grpcio>=1.35.0", - "grpcio-health-checking>=1.45.0", - "numpy>=1.20.3", - "Pint>=0.18", - "protobuf>=3.20.2", - "pyvista>=0.37.0", - "scipy>=1.7.3", - "six>=1.16.0", - "vtk>=9", + "ansys-tools-path>=0.3,<1", + "beartype>=0.11.0,<1", + "google-api-python-client>=1.7.11,<3", + "googleapis-common-protos>=1.52.0,<2", + "grpcio>=1.35.0,<2", + "grpcio-health-checking>=1.45.0,<2", + "numpy>=1.20.3,<2", + "Pint>=0.18,<1", + "protobuf>=3.20.2,<5", + "pyvista>=0.37.0,<1", + "scipy>=1.7.3,<2", + "six>=1.16.0,<2", + "vtk>=9,<10", ] [project.optional-dependencies] all = [ - "ansys-platform-instancemanagement>=1.0.3", - "docker>=6.0.1", + "ansys-platform-instancemanagement>=1.0.3,<2", + "docker>=6.0.1,<8", "pyvista[trame]>=0.38.1,<0.42", ] tests = [