Skip to content
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

docs: Add Python binding build instructions #1182

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/building.dox
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,38 @@ cmake --build build --target docs

The output website is located at `build/docs/html/`

@section python-binding-builds Building Python Bindings

This section contains instructions for building and installing the Python bindings, which are created with [pybind11](https://github.com/pybind/pybind11).

## Steps

1. Clone the `pyslang` repository (https://github.com/MikePopoloski/slang)
parker-research marked this conversation as resolved.
Show resolved Hide resolved
2. Clone the `slang` submodule:

@code{.ansi}
git submodule update --init --recursive
@endcode

3. Create a virtual environment, activate it, and install `pyslang` as a Python package (including building the C++ `slang` library, with bindings):
parker-research marked this conversation as resolved.
Show resolved Hide resolved

@code{.ansi}
python3 -m venv venv
source venv/bin/activate
pip install .
@endcode

## Steps: Run the Python tests

The Python tests are built and executed using the `pytest` framework.

Install test/development dependencies, and run the Python tests:

@code{.ansi}
pip install '.[test]'
pytest
@endcode

@section installation Installation

CMake can be used to install slang.
Expand Down
Loading