Skip to content

Commit 2b3097c

Browse files
authored
updated readme (#48)
1 parent 0b5b74e commit 2b3097c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ brew info sparse2d
7676

7777
### Python bindings
7878

79-
The `pysparse` bindings will be saved to `/usr/local/opt/sparse2d/python` by default. You will need to add this to your `PYTHONPATH` in order to access the bindings. For example, for Bash you would run the following:
79+
The `pysparse` bindings will be saved to `/sparse2d/python` in your Homebrew directory (i.e. `/usr/local/opt` for macOS with Intel or `/opt/homebrew` for macOS with Apple silicon). You will need to add this to your `PYTHONPATH` in order to access the bindings. For example, for a recent Apple computer you would run the following:
8080

8181
```bash
82-
PYTHONPATH="/usr/local/opt/sparse2d/python:$PYTHONPATH"
82+
export PYTHONPATH="/opt/homebrew/sparse2d/python:$PYTHONPATH"
8383
```
8484

8585
Note that `pysparse` will be built using the Python executable installed by Homebrew. These bindings will only work with the same version of Python.
@@ -181,7 +181,11 @@ CC=gcc CXX=g++ cmake ..
181181

182182
## Python bindings
183183

184-
By default Sparse2D will build `pysparse`, which includes Python bindings to some Sparse2D tools. This file will need to be in your `PYTHONPATH` in order for these bindings to available outside of the build directory.
184+
By default Sparse2D will build `pysparse`, which includes Python bindings to some Sparse2D tools. This file will need to be in your `PYTHONPATH` in order for these bindings to available outside of the build directory. You can manually specify an install location for this file passing the option `PYBIND_INSTALL_PATH` to CMake, *e.g.*:
185+
186+
```bash
187+
cmake .. -DPYBIND_INSTALL_PATH=<path to your Python environment>
188+
```
185189

186190
`pysparse` can be imported in a given Python session as follows:
187191

0 commit comments

Comments
 (0)