diff --git a/DESCRIPTION b/DESCRIPTION index bc760fc..e830028 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: htnorm -Version: 0.2.0 +Version: 1.0.0 Title: Fast Simulation of Hyperplane-Truncated Multivariate Normal Distributions Author: Zolisa Bleki Maintainer: Zolisa Bleki diff --git a/build-wheels.sh b/build-wheels.sh index 74110e4..463e722 100755 --- a/build-wheels.sh +++ b/build-wheels.sh @@ -7,35 +7,38 @@ set -e -u -x cd $(dirname $0) bin_arr=( - /opt/python/cp36-cp36m/bin - /opt/python/cp37-cp37m/bin + #/opt/python/cp37-cp37m/bin /opt/python/cp38-cp38/bin - /opt/python/cp39-cp39/bin + #/opt/python/cp39-cp39/bin ) # add python to image's path -export PATH=/opt/python/cp38-cp38/bin/:$PATH +export PATH=/opt/python/cp37-cp37m/bin/:$PATH # download install script curl -#sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry.py # install using local archive -python get-poetry.py -y --file poetry-1.1.4-linux.tar.gz +python get-poetry.py -y --file poetry-1.1.5-linux.tar.gz # install openblas yum install -y openblas-devel function build_poetry_wheels { - # build wheels for 3.6-3.9 with poetry + # build wheels for 3.7-3.9 with poetry for BIN in "${bin_arr[@]}"; do rm -Rf build/* # install build deps - "${BIN}/python" ${HOME}/.poetry/bin/poetry run pip install numpy + "${BIN}/python" ${HOME}/.poetry/bin/poetry run pip install numpy==1.18.1 BUILD_WHEELS=1 "${BIN}/python" ${HOME}/.poetry/bin/poetry build -f wheel - auditwheel repair dist/*.whl --plat $1 - whl="$(basename dist/*.whl)" - "${BIN}/python" -m pip install wheelhouse/"$whl" - # test if installed wheel imports correctly - "${BIN}/python" -c "from pyhtnorm import *" - rm dist/*.whl + mkdir -p ./tmp + for whl in dist/*.whl; do + auditwheel repair "$whl" --plat $1 -w "./tmp" + whlname="$(basename "$(echo ./tmp/*.whl)")" + "${BIN}/python" -m pip install ./tmp/"$whlname" + # test if installed wheel imports correctly + "${BIN}/python" -c "from pyhtnorm import *" + mv ./tmp/*.whl wheelhouse/ + rm "$whl" + done done } diff --git a/pyproject.toml b/pyproject.toml index 1992f50..617070d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyhtnorm" -version = "1.0.0" +version = "2.0.0" description = "Fast Simulation of Hyperplane-Truncated Multivatiate Normal Distributions" authors = ["Zolisa Bleki"] license = "BSD-3-Clause" @@ -20,17 +20,15 @@ include = [ {path = "include", format = "sdist"}, {path = "src/*.c", format = "sdist"}, {path = "src/*.h", format = "sdist"}, - {path = "src/*.txt", format = "sdist"}, - - {path = "pyhtnorm/*.pxd"} + {path = "third_party_licenses"}, ] [tool.poetry.build] script = "build.py" [tool.poetry.dependencies] -python = "^3.6.1" -numpy = "^1.17.0" +python = "^3.7.0" +numpy = "^1.18.1" [tool.poetry.dev-dependencies] Cython = "^0.29.20" @@ -38,5 +36,5 @@ pytest = "*" toml = "^0.10.2" [build-system] -requires = ["poetry-core>=1.0.0a9", "wheel", "setuptools", "numpy>=1.17"] +requires = ["poetry-core>=1.0.0a9", "wheel", "setuptools", "numpy==1.18.1"] build-backend = "poetry.core.masonry.api"