You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ There is a special package needed called boost-python. The standard boost packag
21
21
22
22
+`brew install cmake boost-python`
23
23
24
-
Furthermore, for the homebrew python lib to be used, unfortunately the full path has to be given:
24
+
Furthermore, for the homebrew python lib to be used, its path must be provided to cmake. This is handled in the `build.sh` script, but for reference, or if any issues arise, that can be done manually as follows (substitute the path as appropriate for your Python version):
@@ -39,7 +39,7 @@ All examples contain tests, but these only try to run the examples without check
39
39
40
40
## Python 3
41
41
42
-
The code works with PYthon3 both on Linux and on OS X. However, there is an astonishing number of loops to hop through.
42
+
The code works with Python 3 both on Linux and on OS X. However, there are several caveats.
43
43
44
44
### Linux
45
45
@@ -49,7 +49,12 @@ The code works with PYthon3 both on Linux and on OS X. However, there is an asto
49
49
50
50
### OS X (again with homebrew)
51
51
52
+
Some effort has been made to make Python 3 compilation automatic, by making modifications to `build.sh` and `CMakeLists.txt` that account for quirks on the Apple platform regarding cmake, paths, and naming conventions for python/python3. Having said that, if you use `build.sh`, then you will still need to do the following:
53
+
52
54
+ Build Boost::Python against Python 3 (needs at least version 1.56.0)
53
-
+ make sure `python` resolves to python3 (e.g., by using a python3 VE)
55
+
+ make sure `python` resolves to python3 (e.g., by using virtualenv)
56
+
57
+
If you are building without `build.sh`, then you will additionally need to:
58
+
54
59
+ run `cmake -DBOOST_ROOT=xxx -DPYTHON_LIBRARY=xxx -DPYTHON_INCLUDE_DIR=xxx ..`
55
-
+set DYLD_LIBRARY_PATH to the directory where the boost::python shared library resides before `make test`
60
+
+As of the time of this writing, the naming convention is that python2 is called "python" and python3 is called "python3" on the Apple platform. Therefore, in `CMakeLists.txt` verify that the line `FIND_PACKAGE(Boost COMPONENTS python)` is changed to `FIND_PACKAGE(Boost COMPONENTS python3)`.
0 commit comments