curve/curvefs_python
jolly-sy ada6a181f2 curvebs: support poolset
Co-authored-by: jolly-sy <757050468@qq.com>
Co-authored-by: Hanqing Wu <wuhanqing@corp.netease.com>

Signed-off-by: jolly-sy <757050468@qq.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
2023-06-08 19:17:58 +08:00
..
BUILD_bak chunkserver: fix crc issues 2021-07-09 10:21:27 +08:00
HOWTO.md curvebs: support poolset 2023-06-08 19:17:58 +08:00
README add python api 2019-05-07 21:00:09 +08:00
__init__.py curvefs_python: add build options for python2/3 2020-12-23 14:53:48 +08:00
cbd_client.cpp curvebs: support poolset 2023-06-08 19:17:58 +08:00
cbd_client.h curvebs: support poolset 2023-06-08 19:17:58 +08:00
client.conf add License head for all files 2020-07-13 15:20:43 +08:00
configure.sh fix: skip build curvefs when configure failed 2020-12-24 16:07:19 +08:00
curve fix file header for *.sh and *.py 2020-07-25 16:02:51 +08:00
curve_type.h curvebs: support poolset 2023-06-08 19:17:58 +08:00
curvefs.i support multi-client with python interface 2020-06-01 17:22:24 +08:00
curvefs.py curvebs: support poolset 2023-06-08 19:17:58 +08:00
curvefs_tool.py fix: curvefs_tool.py create vol stripe 2021-03-11 14:52:43 +08:00
curvefs_wrap.cxx curvebs: support poolset 2023-06-08 19:17:58 +08:00
libcurvefs.h curvefs: recovey recyclebin file 2021-02-23 19:42:53 +08:00
parser.py curvefs: recovey recyclebin file 2021-02-23 19:42:53 +08:00
setup.py fix coding 2020-07-25 16:02:51 +08:00
test.py add password for curvefs_tool && disable error log output to console 2020-08-12 20:15:24 +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目录下执行 ./curvefs_python/config.sh
3.编译curvefs库
4.拷贝生成libcurvefs动态库到动态库可以搜索的路径
5.接口封装在curvefs.py中可以通过import curvefs使用

eg

编译整个工程:
bazel build ... --copt -DHAVE_ZLIB=1 --compilation_mode=dbg -s --define=with_glog=true --define=libunwind=true

在curve目录下执行配置脚本
sh ./curvefs_python/config.sh

编译curvefs库需要增加一个linkopt选项指定curvefs_python/tmplib路径
bazel build curvefs_python:curvefs  --copt -DHAVE_ZLIB=1 --compilation_mode=dbg -s --define=with_glog=true --define=libunwind=true --linkopt -L/home/hzzhaojianming/curve/curvefs_python/tmplib

编译成功拷贝libcurvefs.so并重命名为_curvefs.so