Skip to main content

Option Pricing

Overview

Python PyO3 wrapper package over Rust crate option-pricing.

3 builds:

Build

Commands:

# prerequisite
mm activate work
pip install 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=win-amd64" > $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_option_pricing-0.1.0-cp310-cp310-linux_x86_64.whl
pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl
pyo3_option_pricing-0.1.0-cp311-cp311-linux_x86_64.whl
pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyo3_option_pricing-0.1.0.tar.gz

Publish

Commands:

# prerequisite
mm activate work
pip install -U twine

twine check dist/*

# assuming .pypirc configured
# for linux only manylinux: the others will be refused
twine upload dist/*.tar.gz
twine upload dist/*manylinux*
twine upload dist/*win_amd64*

Install

Commands:

pip install pyo3_option_pricing

Ref

Packaging offical recommendation: Is setup.py deprecated?.

Metadata

Release files for pyo3-option-pricing 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyo3-option-pricing 0.1.0
File Size Uploaded
pyo3_option_pricing-0.1.0.tar.gz 6.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyo3-option-pricing 0.1.0
File Interpreter ABI Platform
pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details

Total release size: 699.6 kB

Release files / pyo3_option_pricing-0.1.0.tar.gz

Download URL pyo3_option_pricing-0.1.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7a85b8d479ec7f5033c4a8e14a8de945569f74eb64233928758ea92745b99d75
BLAKE2b-256 checksum
How to use checksums
3e1b14c26d563066da7839ad8f83c471f18475fe6a134d4be1c07ad3c0ceeffd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 239.8 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8590bd4fd7f7cfbaa1cd249ad067c8fd7c601b870b44b80740189fdff8746cd8
BLAKE2b-256 checksum
How to use checksums
9d0dfe02284ea1cb82010d186c932c33e36fdfaac0bf4eff46dd810dd09515b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl

Download URL pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl
Size 213.8 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
0313d6ef420f11e1a9fa499591d2f5ade804d631c99073211dbb99ac90a31649
BLAKE2b-256 checksum
How to use checksums
4f8bc8eb9b92c2522190325757fd067e7e454336cb4a20b5d6d74c7976a83312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 239.8 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1cac6e48963002f17bc5bb5436f2ba25ebed8499ad2f8e702a91c36937737afd
BLAKE2b-256 checksum
How to use checksums
84fdaa9f4f7e89cbbcf640f4119b8c5fbf99b7f25637e930cfa685e92c7e8e88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page