From 2aa290893360bf91d333c9565e15d4bd45bf5ae5 Mon Sep 17 00:00:00 2001 From: gumyr Date: Wed, 6 Dec 2023 14:43:41 -0500 Subject: [PATCH] Updating docs for pypi installation --- README.md | 8 +++++++- docs/installation.rst | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index afa23f1..0b8e7be 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,12 @@ The documentation for **build123d** can found at [readthedocs](https://build123d There is a [***Discord***](https://discord.com/invite/Bj9AQPsCfx) server (shared with CadQuery) where you can ask for help in the build123d channel. -The recommended method for most users is to install **build123d** with one of the following two commands. +The recommended method for most users is to install **build123d** is: +``` +pip install build123d +``` + +To get the latest non-released version of **build123d*** one can install from GitHub using one of the following two commands: In Linux/MacOS, use the following command: ``` @@ -25,6 +30,7 @@ In Windows, use the following command: ``` python -m pip install git+https://github.com/gumyr/build123d ``` + If you receive errors about conflicting dependencies, you can retry the installation after having upgraded pip to the latest version with the following command: ``` python3 -m pip install --upgrade pip diff --git a/docs/installation.rst b/docs/installation.rst index 6aec4ea..ec30cda 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,10 +1,22 @@ ############ Installation ############ -Install build123d from github: ----------------------------------------------- -The recommended method for most users is to install build123d with one of the following two commands. +The recommended method for most users is to install **build123d** is: + +.. doctest:: + + >>> pip install build123d + +.. note:: + + The `ocp-vscode `_ viewer has + the ability to install **build123d**. + +Install build123d from GitHub: +------------------------------ + +To get the latest non-released version of **build123d** one can install from GitHub using one of the following two commands: In Linux/MacOS, use the following command: @@ -25,8 +37,14 @@ upgraded pip to the latest version with the following command: >>> python3 -m pip install --upgrade pip -If you use `poetry `_ to install build123d, you might need to specify -the branch that is used for git-based installs ; until quite recently, poetry used to checkout the +If you use `poetry `_ to install build123d, you can simply use: + +.. doctest:: + + >>> poetry add build123d + +However, if you want the latest commit from GitHub you might need to specify +the branch that is used for git-based installs; until quite recently, poetry used to checkout the `master` branch when none was specified, and this fails on build123d that uses a `dev` branch. Pip does not suffer from this issue because it correctly fetches the repository default branch. @@ -62,6 +80,13 @@ with the following commands: Please substitute ``python3`` with ``python`` in the lines above if you are using Windows. +If you're working directly with the OpenCascade ``OCP`` layer you will likely want to install +the OCP stubs as follows: + +.. doctest:: + + >>> python3 -m pip install git+https://github.com/CadQuery/OCP-stubs@7.7.0 + Test your build123d installation: ---------------------------------------------- If all has gone well, you can open a command line/prompt, and type: