Skip to main content

Poker eval library

Project description

Poker Eval

Overview

Python PyO3 wrapper package over Rust crate poker_eval.
Cross compilation "linux2win" is done with cross.

Build

Commands:

# 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

This produced wheels for linux and 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

Publish

Commands:

# prerequisite
mm activate work
pip install -U twine auditwheel

twine check dist/*

# assuming .pypirc configured
twine upload dist/*

Install

Commands:

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

Ref

Python packaging offical recommendation: Is setup.py deprecated?.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyo3_poker_eval-0.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distributions

pyo3_poker_eval-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (324.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyo3_poker_eval-0.1.0-cp310-cp310-win_amd64.whl (290.3 kB view hashes)

Uploaded 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 view hashes)

Uploaded 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 view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page