-
Notifications
You must be signed in to change notification settings - Fork 83
Separate documentation into "Install" and "Build from Source" #1138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,3 +62,6 @@ venv/ | |
build/ | ||
!.github/actions/build/ | ||
!.github/actions/build/** | ||
|
||
# Documentation | ||
!docs/source/Build/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Building from Source | ||
==================== | ||
|
||
.. _bskInstall-build: | ||
|
||
For advanced users and developers who want to customize or debug Basilisk. For | ||
most users the precompiled version available on PyPI is sufficient. See the | ||
:ref:`Install Instructions <bskInstall>` for more information. | ||
|
||
.. note:: | ||
To use custom C++ modules, Basilisk must be built from source. | ||
The prebuilt PyPI wheels are designed for most users and include all standard | ||
features, but they do not yet support linking external C++ modules. | ||
We're actively exploring ways to enable this in future releases. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
Build/pullCloneBSK | ||
Build/installOnLinux | ||
Build/installOnMacOS | ||
Build/installOnWindows | ||
Build/installBuild | ||
Build/buildExtModules | ||
Build/customPython | ||
Build/installBuildConan |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,17 @@ | |
|
||
.. _pipInstall: | ||
|
||
Advanced: Building and Installing Pre-Compiled Basilisk Wheels | ||
============================================================== | ||
Advanced: Building Pre-Compiled Basilisk Wheels | ||
=============================================== | ||
|
||
.. warning:: | ||
|
||
:beta:`Pip Wheel Support` This method of building Basilisk is currently a beta feature, and should only be attempted by advanced users | ||
familiar with `Python packaging and distribution | ||
<https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/>`_. | ||
This method is not yet guaranteed to work on every platform, and there are still some annoyances | ||
to iron out, but we appreciate any feedback you may have. | ||
The following instructions explain how to build wheels with Basilisk. | ||
While we distribute pre-compiled wheels already in :ref:`bskInstall`, | ||
you can also build them manually using the steps below. This is desirable if | ||
you want to use Python wheels but still need to enable custom build options | ||
or link against a custom external module location. | ||
|
||
Most users should see :ref:`configureBuild` for documentation on the regular build process. | ||
|
||
|
||
Building and Installing with ``pip`` | ||
Building Wheels and Installing with ``pip`` | ||
------------------------------------ | ||
|
||
.. note:: | ||
|
@@ -49,11 +45,6 @@ After installing | |
Building Basilisk ``wheel`` File | ||
-------------------------------- | ||
|
||
On its own, there is no significant benefit to installing Basilisk in this way. However, supporting standard Python | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 43 has errand "After installing" statement. Should be deleted. Do we still need the "Wheel Compatibility" Section? Section "For Maintainers: Overview of Implementation" needs to be updated. Still talks about not using |
||
packaging tools means that Basilisk can now be built into a pre-compiled `"wheel" (.whl) file | ||
<https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#wheels>`_ that can be shared | ||
and installed on other compatible machines. | ||
|
||
Using ``pip``, the command below will generate a ``Basilisk-*.whl`` file in the current directory:: | ||
|
||
pip wheel --no-deps -v . | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,70 @@ | ||
.. Basilisk documentation master file, created by | ||
sphinx-quickstart on Mon Sep 23 13:52:19 2019. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
|
||
.. _bskInstall: | ||
|
||
Install | ||
======= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
Install/pullCloneBSK | ||
Install/installOnLinux | ||
Install/installOnMacOS | ||
Install/installOnWindows | ||
Install/installBuild | ||
Install/buildExtModules | ||
Install/customPython | ||
Install/installBuildConan | ||
Install/pipInstall | ||
Basilisk can be installed either from `PyPI <https://pypi.org/project/bsk/>`_ as | ||
a prebuilt wheel or built locally from source. | ||
The prebuilt wheels include all standard features, such as optical navigation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change "all standard features,..." to "all build options,..." |
||
and MuJoCo dynamics, but do **not** support linking external C++ modules, as | ||
this requires rebuilding Basilisk. | ||
|
||
If you want to use custom C++ modules, or prefer smaller install sizes by | ||
excluding unused features, you must build Basilisk from source. | ||
See the :ref:`Building from Source <bskInstall-build>` for more information. | ||
|
||
.. note:: | ||
We are currently investigating ways to allow users to link external C++ | ||
modules while using the prebuilt PyPI wheel. Stay tuned! | ||
|
||
|
||
The easiest way to install Basilisk is using ``pip`` to install the prebuilt | ||
package from PyPI. Run: | ||
|
||
.. code-block:: bash | ||
|
||
pip install bsk | ||
|
||
Or, if using `uv <https://docs.astral.sh/uv/>`_ (a modern Python package manager): | ||
|
||
.. code-block:: bash | ||
|
||
uv pip install bsk | ||
|
||
This installs the latest stable version of Basilisk and all dependencies. | ||
To install a specific version, run: | ||
|
||
.. code-block:: bash | ||
|
||
pip install bsk==<version> | ||
|
||
Replace ``<version>`` with the desired release number, e.g. ``2.0.0``. | ||
|
||
|
||
**Prebuilt wheel availability:** | ||
|
||
- **Windows:** Windows 10/11 (x86_64) | ||
- **macOS:** macOS 11+ (x86_64 and Apple Silicon arm64) | ||
- **Linux:** Manylinux 2.24+ (x86_64, aarch64) | ||
|
||
All wheels are built as **ABI3** packages for Python **3.8 and newer**. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we just say "for Basilisk supported Python version"? This way, when we remove 3.8 support, nothing has to be changed here? |
||
|
||
.. note:: | ||
On unsupported systems or Python versions, ``pip`` will automatically | ||
download the source archive (``.tar.gz``) and build Basilisk locally. | ||
This requires a C++ compiler toolchain and standard build tools | ||
to be installed on your system. | ||
|
||
To keep the wheel size smaller, the large BSK data files are not installed by | ||
default. If the user wants to use script that assumes they are included into | ||
the Basilisk python package, then go to the command line, change the current | ||
directory to be inside the environment where Basilisk was ``pip`` installed, | ||
and run the command:: | ||
|
||
bskLargeData | ||
|
||
This command runs a python file stored in the ``src/utilities`` folder. | ||
The ``pip install`` process automatically | ||
creates this console command in the current python environment to call this | ||
python file. The file directly downloads the missing large BSK data files and put | ||
them into the local Basilisk python package installation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need more dashes. They have to match the length of the prior line or you get a sphinx warning.