跳转到主要内容

基于PyO3的Alluxio Fsspec本地增强模块,使用Rust编写

项目描述

一个基于PyO3的通用本地扩展库,用于Alluxio Python客户端

开发者必备条件

在本地构建开发版本并运行

  1. 创建虚拟环境(一个用于创建隔离Python环境的工具)
python3 -m venv .env
source .env/bin/activate
maturin develop
  1. 然后可以开始使用
python3
from alluxiocommon import _DataManager
dm = _DataManager(4)
# do something with dm...

构建wheel包并使用pip安装

#in rust/alluxiocommon dir:
$ maturin build --out <alluxiofs_home>/dist -m <alluxiofs_home>/rust/alluxiocommon/Cargo.toml -i python<x.y> (python version such as 3.8)
#then find .whl package in <alluxiofs_home>/dist:
[root@ip-XXX-XX-XX-XX alluxiofs]# ls -l dist/
total 21848
-rw-r--r--. 1 root root 22318133 Apr 28 05:31 alluxiocommon-0.1.0-cp38-cp38-linux_x86_64.whl
#install with pip
$ pip install dist/alluxiocommon-0.1.0-cp38-cp38-linux_x86_64.whl --force-reinstall

构建发布包并发布到PyPI

#in rust/alluxiocommon dir, important is to add --manylinux 2014 for PyPI restriction for wheel package to be compatible with many linux platforms. (PEP 513)
$ docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin build --release --manylinux 2014
#the .whl package will appear in rust/alluxiocommon/target/wheels/
#check and publish with PyPI:
$ twine check target/wheels/*
#test upload to TestPyPI
$ python3 -m twine upload --repository testpypi target/wheels/* --verbose
#upload to PyPI
$ python3 -m twine upload target/wheels/*

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源代码分发

此版本没有可用的源代码分发文件。有关 生成分发存档 的教程。

构建分发

alluxiocommon-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB 查看哈希值)

上传时间: CPython 3.8 manylinux: glibc 2.17+ x86-64

支持者:

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面