curve/curvesnapshot_python
wuhanqing 1f1a2bac2a optimize curve-client 2020-09-23 22:20:02 +08:00
..
BUILD_bak remove c++14 feature 2020-07-23 16:12:22 +08:00
README fix snapshot wrapper 2019-06-15 12:06:17 +08:00
__init__.py [client] add init file for curvesnapshot python test 2019-08-14 15:03:55 +08:00
client.conf add License head for all files 2020-07-13 15:20:43 +08:00
configure.sh fix file header for *.sh and *.py 2020-07-25 16:02:51 +08:00
curvesnapshot.py add License head for all files 2020-07-13 15:20:43 +08:00
libcurveSnapshot.cpp optimize curve-client 2020-09-23 22:20:02 +08:00
libcurveSnapshot.h add License head for all files 2020-07-13 15:20:43 +08:00
libcurve_snapshot.i fix snapshot wrapper 2019-06-15 12:06:17 +08:00
libcurve_snapshot_wrap.cxx add License head for all files 2020-07-13 15:20:43 +08:00
test.py fix file header for *.sh and *.py 2020-07-25 16:02:51 +08:00

README

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