-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for automated wheel packaging / PyPI deploys
- Loading branch information
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
language: python | ||
|
||
matrix: | ||
include: | ||
- name: "Linux 64-bit" | ||
sudo: required | ||
services: | ||
- docker | ||
env: | ||
- CIBW_SKIP=*manylinux1_i686* | ||
- PIP=pip | ||
- PYTHON=python | ||
- name: "Linux 32-bit" | ||
sudo: required | ||
services: | ||
- docker | ||
env: | ||
- CIBW_SKIP=*manylinux1_x86_64* | ||
- PIP=pip | ||
- PYTHON=python | ||
- name: "macOS" | ||
os: osx | ||
language: generic | ||
env: | ||
- PIP=pip2 | ||
- PYTHON=python2 | ||
|
||
env: | ||
global: | ||
- TWINE_USERNAME=michael.sanders | ||
|
||
script: | ||
- $PIP install cibuildwheel setuptools_rust | ||
- export CIBW_BEFORE_BUILD="pip install setuptools_rust && source ./scripts/travis" | ||
- export CIBW_SKIP=cp34-*\ $CIBW_SKIP | ||
- export CIBW_ENVIRONMENT='PATH="$HOME/rust/bin:$PATH"' | ||
- cibuildwheel --output-dir wheelhouse | ||
- | | ||
if [[ $TRAVIS_TAG ]]; then | ||
$PIP install twine | ||
$PYTHON -m twine upload wheelhouse/*.whl | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
environment: | ||
TWINE_USERNAME: michael.sanders | ||
matrix: | ||
# Stable 64-bit MSVC | ||
- channel: stable | ||
target: x86_64-pc-windows-msvc | ||
CIBW_SKIP: "*win32* cp27-* cp33-* cp34-*" | ||
CIBW_BEFORE_BUILD: pip install setuptools-rust | ||
# Stable 32-bit MSVC | ||
- channel: stable | ||
target: i686-pc-windows-msvc | ||
CIBW_SKIP: "*win_amd64* cp27-* cp33-* cp34-*" | ||
CIBW_BEFORE_BUILD: pip install setuptools-rust | ||
|
||
|
||
# From https://github.com/starkat99/appveyor-rust/blob/master/appveyor.yml | ||
install: | ||
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe | ||
- rustup-init -yv --default-toolchain nightly --default-host %target% | ||
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin | ||
- rustc -vV | ||
- cargo -vV | ||
- pip install cibuildwheel==0.9.4 setuptools_rust | ||
|
||
build_script: | ||
- cibuildwheel --output-dir wheelhouse | ||
- > | ||
IF "%APPVEYOR_REPO_TAG%" == "true" | ||
( | ||
python -m pip install twine | ||
&& | ||
python -m twine upload 'wheelhouse/*.whl' | ||
) | ||
artifacts: | ||
- path: "wheelhouse\\*.whl" | ||
name: Wheels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
# From https://github.com/benfred/py-cpp-demangle/blob/13a22fd/ci/install_rust.sh | ||
# https://www.benfrederickson.com/writing-python-extensions-in-rust-using-pyo3/ | ||
if [ ! -d ~/rust-installer ]; then | ||
set -x | ||
mkdir ~/rust-installer | ||
curl -sL https://static.rust-lang.org/rustup.sh -o ~/rust-installer/rustup.sh | ||
sh ~/rust-installer/rustup.sh --prefix=~/rust --spec=nightly --disable-sudo -y | ||
set +x | ||
fi | ||
|
||
if command -v yum; then | ||
yum install -y gpg libXtst libXtst-devel libXext libXext-devel | ||
fi |