import os cpp_dir = '../petrel-oss-cpp-sdk/' dst_dir = './petrel_client/ceph/s3cpp/' so_file = 'pys3client.cpython-3*-x86_64-linux-gnu.so' cpp_so = cpp_dir + so_file os.system('cp -f '+cpp_so+' '+dst_dir) # src_lib = cpp_dir + lib_dir # dst_lib = dst_dir + 'libs' # os.system('ln -sf '+src_lib+' '+dst_dir) # find aws associated .so src_libs = '~/anaconda3/lib/' need_so = ['libaws-c-common.so','libaws-c-event-stream.so','libaws-checksums.so','libaws-cpp-sdk-core.so', 'libaws-cpp-sdk-s3.so', 'libaws-cpp-sdk-transfer.so'] aws_dst_so = dst_dir + 'libs/' for aws_so in need_so: src_so = src_libs + aws_so os.system('cp -f '+src_so+' '+aws_dst_so)