curve/curvesnapshot_python/README

22 lines
1011 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1.编译整个工程
2.在curve目录下执行 ./curvesnapshot_python/config.sh
3.编译curvesnapshot库
4.拷贝生成libcurvesnapshot动态库到动态库可以搜索的路径
5.接口封装在curvesnapshot.py中可以通过import curvesnapshot使用
eg
编译整个工程:
bazel build ... --copt -DHAVE_ZLIB=1 --compilation_mode=dbg -s --define=with_glog=true --define=libunwind=true
在curve目录下执行配置脚本
sh ./curvesnapshot_python/config.sh
设置链接动态库路径
export LD_LIBRARY_PATH=/yourpath/curvesnapshot_python/tmplib
编译curvesnapshot库需要增加一个linkopt选项指定curvesnapshot_python/tmplib路径
bazel build curvesnapshot_python:curvesnapshot --copt -DGFLAGS_NS=google --copt -Wno-error=format-security --copt -DHAVE_ZLIB=1 --compilation_mode=dbg -s --define=with_glog=true --define=libunwind=true --linkopt -L/home/hzzhaojianming/curve/curvesnapshot_python/tmplib
编译成功拷贝libcurvesnapshot.so并重命名为_curvesnapshot.so