Commit d99c5f0e authored by Richard Torenvliet's avatar Richard Torenvliet

Use pybind11 instead of c headers

parent 292bf39b
......@@ -32,6 +32,12 @@ RUN cmake ../ \
-DPYTHON_EXECUTABLE=/usr/bin/python
RUN make && make install
ENV PYTHONPATH=/usr/local/eos/bin/:$PYTHONPATH
WORKDIR /libs
RUN git clone https://github.com/pybind/pybind11.git
RUN (cd pybind11; mkdir build; cd build; cmake -DPYBIND11_PYTHON_VERSION=2.7 ..);
RUN (cd pybind11/build; make -j4 && make install);
WORKDIR /src
......@@ -44,5 +44,25 @@ $(SITE_PACKAGES)/cv%:
@ls $@
#src/reconstruction/fit.so: src/reconstruction/fit-model.cpp
# $(BASE_DOCKER_CMD) /bin/bash -c '(cd reconstruction; python setup.py build_ext --inplace)'
src/reconstruction/fit.so: src/reconstruction/fit-model.cpp
$(BASE_DOCKER_CMD) /bin/bash -c '(cd reconstruction; python setup.py build_ext --inplace)'
$(BASE_DOCKER_CMD) /bin/bash -c \
'(cd reconstruction; \
g++ -fPIC -O3 -shared -std=c++11 \
-I/usr/local/include/pybind11/include/ \
-I/usr/local/eos/include/ \
-I/usr/local/eos/3rdparty/glm/ \
-I/usr/local/eos/3rdparty/cereal-1.1.1/include/ \
-I/usr/local/include/opencv2/ \
-I/usr/include/boost/ \
-L/usr/local/eos/bin/ \
-L/usr/lib/x86_64-linux-gnu/ \
-L/usr/local/lib/ \
-lboost_program_options \
-lfile_system \
-lopencv_world \
`python-config --cflags --ldflags` \
$(notdir $^) -o $(notdir $@) \
)'
This diff is collapsed.
......@@ -49,8 +49,7 @@ def fit_model():
input_points = dataset_module.factory(filename=image_filename)
input_image = input_points.get_image()
fit.fit_model(image)
print(fit.add(1, 3))
if __name__ == '__main__':
#fit_model()
shape()
fit_model()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment