Cannot specify additional PYTHONPATH inside buildout.cfg
I hope you are doing well with porting all packages to GitLab. As this package is already here, I will add my question/bug here...
Lately, I have seen the need to use OpenCV together with Bob. As I want to have a local installation of everything, I wrote a small script that downloads, compiles and installs OpenCV into a custom directory, say, opencv
. Having a look into the opencv
directory, I can find the file: opencv/lib/python2.7/dist-packages/cv2.so
-- but nothing else is inside that directory.
Indeed, when I use run buildout
without specifying any extra path, I can run:
$ PYTHONPATH=opencv/lib/python2.7/dist-packages bin/python
>>> import cv2
>>>
Now, I want to add this additional directory into my buildout.cfg file. I have tried several options of doing that, based on the documentation on PyPI (https://pypi.python.org/pypi/bob.buildout/2.0.13):
prefixes = opencv
prefixes = opencv/lib
prefixes = opencv/lib/python2.7
prefixes = opencv/lib/python2.7/dist-packages
-
PYTHONPATH = opencv/lib/python2.7/dist-packages```
extra-path = opencv/lib/python2.7/dist-packages```
but none of these options helped in order to add the directory into the path
variable inside bin/python
and, consequently, this doesn't work:
$ ./bin/python
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2
My questions are:
- which of the directories should theoretically work for the
prefixes
option (given that it would work at all). This might also be a nice information to be added to the documentation. - Do I need to write anything else (or create any other file) inside the
opencv/lib/python2.7/dist-packages
directory in order to makebuildout
see this directory and include it into the path?
Cheers Manuel