跳转到主要内容

扑克评估库

项目描述

Poker Eval

概述

Python PyO3 包装包,覆盖Rust存档 poker_eval.
使用 cross 进行跨编译 "linux2win"。

构建

命令

# prerequisite
mm activate work
pip install -U build

# dev install
pip install -e .

# watch 
cargo watch --watch rust -- pip install -e .

# test
pytest

# install
pip install .

# ------- build native wheel
unset CARGO
unset CARGO_BUILD_TARGET
unset PYO3_CROSS_LIB_DIR
unset PYO3_CROSS_PYTHON_VERSION
unset DIST_EXTRA_CONFIG

python -m build


# ------- build manylinux wheel
# image used by build
docker build -t builder-manylinux:local -f ./Dockerfile.manylinux .

# build wheels for several python versions
docker run --rm -v $(pwd):/io builder-manylinux:local /bin/bash /io/build-manylinux-wheels.sh


# ------- build windows wheel - using cross
# prerequisite
cargo install cross

export CARGO=cross
export CARGO_BUILD_TARGET=x86_64-pc-windows-gnu
export DIST_EXTRA_CONFIG=/tmp/build-opts.cfg

# set wheel suffix
echo -e "[bdist_wheel]\nplat_name=pc_windows_gnu_x86_64" > $DIST_EXTRA_CONFIG

# image used by cross
docker build -t cross-pyo3:x86_64-pc-windows-gnu -f ./Dockerfile.win .

# build windows wheel
python -m build

这生成了linux和windows的轮子

ls -1  dist
pyo3_poker_eval-0.1.0-cp310-cp310-linux_x86_64.whl
pyo3_poker_eval-0.1.0-cp310-cp310-pc_windows_gnu_x86_64.whl
pyo3_poker_eval-0.1.0.tar.gz

发布

命令

# prerequisite
mm activate work
pip install -U twine auditwheel

twine check dist/*

# assuming .pypirc configured
twine upload dist/*

安装

命令

############ TBD - no ready yet
pip install pyo3_poker_eval

参考

Python打包官方建议: setup.py 被弃用了吗?.

项目详情


下载文件

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

源分布

pyo3_poker_eval-0.1.0.tar.gz (5.9 kB 查看散列)

上传时间

构建分布

pyo3_poker_eval-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (324.7 kB 查看哈希)

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

pyo3_poker_eval-0.1.0-cp310-cp310-win_amd64.whl (290.3 kB 查看哈希)

上传时间: CPython 3.10 Windows x86-64

pyo3_poker_eval-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (324.6 kB 查看哈希)

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

pyo3_poker_eval-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (324.6 kB 查看哈希)

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

支持者

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