Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
python:
working_directory: ~/repo
docker:
- image: konstin2/pyo3-pack:0.5.0
- image: konstin2/maturin:v0.8.2-alpha.1
steps:
- checkout
- run:
Expand All @@ -54,11 +54,12 @@ jobs:
- run:
name: build-wheels
command: |
set -ex
cd python
for PYBIN in python3.{6,7}; do
"$PYBIN" -m pip install setuptools setuptools-rust>=0.10.2
"$PYBIN" -m pip install numpy==1.15.0 scipy==1.1.0
export PATH="$PATH:/opt/python/cp38-cp38m/bin/"
for PYBIN in python3.{6,7,8}; do
"$PYBIN" -m pip install wheel==0.31.1 auditwheel==2.0.0 pytest hypothesis
"$PYBIN" -m pip install -r ../ci/requirements-build.txt
"$PYBIN" setup.py bdist_wheel
done
for whl in dist/*.whl; do
Expand All @@ -68,8 +69,10 @@ jobs:
- run:
name: test
command: |
set -ex
cd python
for PYBIN in python3.{6,7}; do
export PATH="$PATH:/opt/python/cp38-cp38m/bin/"
for PYBIN in python3.{6,7,8}; do
"$PYBIN" -m pip uninstall -y vtext
cd /tmp/
"$PYBIN" -m pip install --pre --no-index --find-links /root/repo/python/dist/ vtext
Expand Down
8 changes: 6 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ jobs:
- template: ci/azure/posix.yml
parameters:
name: macOS
vmImage: xcode9-macos10.13
vmImage: macOS-10.14
matrix:
py38:
PYTHON_VERSION: '3.8'
PYTHON_ARCH: '64'
py37:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: '64'
py36:
PYTHON_VERSION: '3.6'

PYTHON_ARCH: '64'

- template: ci/azure/windows.yml
parameters:
Expand Down
6 changes: 3 additions & 3 deletions ci/azure/install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ call activate %VIRTUALENV%
python --version
pip --version

@rem Use oldest supported numpy and scipy versions for building wheels
pip install numpy==1.15.0 scipy==1.1.0 pytest>=4.0.0 wheel>=0.31.1 hypothesis
pip install scipy==1.4.1 pytest>=4.0.0 wheel>=0.31.1 hypothesis

curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain nightly-2019-11-01
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"

rustup set default-host x86_64-pc-windows-gnu
rustup default nightly-2019-11-01

@rem Install the build and runtime dependencies of the project.
cd python/
pip install -r requirements.txt
python -m pip install -r ..\ci\requirements-build.txt
python setup.py bdist_wheel

pip install pytest-faulthandler
Expand Down
8 changes: 4 additions & 4 deletions ci/azure/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -ex

UNAMESTR=`uname`

Expand All @@ -12,18 +12,18 @@ source activate $VIRTUALENV
python --version
pip --version

# Use oldest supported numpy, scipy versins for building wheels
pip install numpy==1.15.0 scipy==1.1.0 pytest>=4.0.0 wheel>=0.31.1 hypothesis
pip install scipy==1.1.0 pytest>=4.0.0 wheel>=0.31.1 hypothesis

python -c "import numpy; print('numpy %s' % numpy.__version__)"
python -c "import scipy; print('scipy %s' % scipy.__version__)"
pip list

curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2019-11-01
source $HOME/.cargo/env
rustup default nightly-2019-11-01

cd python/
pip install -r requirements.txt
python -m pip install -r ../ci/requirements-build.txt
python setup.py bdist_wheel

pip install --pre --no-index --find-links dist/ vtext
2 changes: 2 additions & 0 deletions ci/azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
# fix permissions on MacOS
- script: sudo chown -R 501:20 /usr/local/miniconda/
- script: |
ci/azure/install.sh
displayName: 'Install'
Expand Down
5 changes: 5 additions & 0 deletions ci/requirements-build.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
setuptools
wheel
setuptools-rust
numpy==1.17.3
scipy==1.4.1
9 changes: 8 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools-rust"]
requires = [
"setuptools",
"wheel",
"setuptools-rust",
"numpy==1.13.3; python_version=='3.6'",
"numpy==1.14.5; python_version=='3.7'",
"numpy==1.17.3; python_version>='3.8'",
]
1 change: 0 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
rust_extensions=[
RustExtension(
"vtext._lib",
"./Cargo.toml",
rustc_flags=["--cfg=Py_3"],
features=["numpy/python3"],
args=["--no-default-features"],
Expand Down