期权定价库
项目描述
期权定价
概述
Python PyO3 对Rust crate option-pricing 的包装包。
3个构建
构建
命令
# 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 .
这生成了Linux和Windows的wheel文件
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
发布
命令
# 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*
安装
命令
pip install pyo3_option_pricing
参考
打包官方推荐: setup.py 已弃用?.
项目详情
下载文件
下载适合您平台文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。
源分布
pyo3_option_pricing-0.1.0.tar.gz (6.1 kB 查看哈希值)
构建分布
关闭
pyo3_option_pricing-0.1.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 7a85b8d479ec7f5033c4a8e14a8de945569f74eb64233928758ea92745b99d75 |
|
MD5 | 1257d166c975c394dd3994d8a2cf0c75 |
|
BLAKE2b-256 | 3e1b14c26d563066da7839ad8f83c471f18475fe6a134d4be1c07ad3c0ceeffd |
关闭
pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8590bd4fd7f7cfbaa1cd249ad067c8fd7c601b870b44b80740189fdff8746cd8 |
|
MD5 | d72dafaebd64fffc9b29c68460f393b4 |
|
BLAKE2b-256 | 9d0dfe02284ea1cb82010d186c932c33e36fdfaac0bf4eff46dd810dd09515b6 |
关闭
pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0313d6ef420f11e1a9fa499591d2f5ade804d631c99073211dbb99ac90a31649 |
|
MD5 | 6af2d6da19137dd867ed330d8b422155 |
|
BLAKE2b-256 | 4f8bc8eb9b92c2522190325757fd067e7e454336cb4a20b5d6d74c7976a83312 |
关闭
pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1cac6e48963002f17bc5bb5436f2ba25ebed8499ad2f8e702a91c36937737afd |
|
MD5 | 9adcaca64c1bad2de73a561ef0b642fe |
|
BLAKE2b-256 | 84fdaa9f4f7e89cbbcf640f4119b8c5fbf99b7f25637e930cfa685e92c7e8e88 |