-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
239 additions
and
45 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,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
for PYVER in "cp35-cp35m" "cp36-cp36m" "cp37-cp37m"; do | ||
PYBIN="/opt/python/${PYVER}/bin" | ||
"${PYBIN}/python" -m pip install wheel | ||
"${PYBIN}/python" setup.py bdist_wheel | ||
done | ||
find dist -name "*.whl" -exec auditwheel repair {} \; |
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
brew update | ||
brew outdated pyenv || brew upgrade pyenv | ||
export PATH=~/.pyenv/shims:$PATH | ||
for PYVER in "3.5.7" "3.6.8" "3.7.3"; do | ||
pyenv install ${PYVER} | ||
pyenv global ${PYVER} | ||
python -m pip install wheel | ||
python setup.py bdist_wheel | ||
done |
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,59 @@ | ||
#!/usr/bin/env python | ||
from __future__ import unicode_literals, print_function | ||
|
||
import os.path | ||
import sys | ||
import time | ||
|
||
import requests | ||
|
||
api_url = 'https://ci.appveyor.com/api' | ||
account_name = os.getenv('APPVEYOR_ACCOUNT') | ||
project_slug = os.getenv('APPVEYOR_SLUG') | ||
headers = {'Authorization': 'Bearer ' + os.getenv('APPVEYOR_TOKEN')} | ||
|
||
# Trigger the AppVeyor build | ||
r = requests.post(api_url + '/builds', { | ||
'accountName': account_name, | ||
'projectSlug': project_slug, | ||
'branch': os.getenv('TRAVIS_BRANCH'), | ||
'commitID': os.getenv('TRAVIS_COMMIT') | ||
}, headers=headers) | ||
r.raise_for_status() | ||
build = r.json() | ||
print('Started AppVeyor build (buildId={buildId}, version={version})'.format(**build)) | ||
|
||
# Wait until the build has finished | ||
while True: | ||
url = '{}/projects/{}/{}/build/{}'.format(api_url, account_name, project_slug, | ||
build['version']) | ||
r = requests.get(url, headers=headers) | ||
r.raise_for_status() | ||
build = r.json()['build'] | ||
status = build['status'] | ||
if status in ('starting', 'queued', 'running'): | ||
print('Build status: {}; checking again in 5 seconds'.format(status)) | ||
time.sleep(5) | ||
elif status == 'success': | ||
print('Build successful') | ||
job_ids = [job['jobId'] for job in build['jobs']] | ||
break | ||
else: | ||
print('Build failed with status: {}'.format(status), file=sys.stderr) | ||
sys.exit(1) | ||
|
||
# Download the artifacts to wheelhouse/ | ||
os.mkdir('wheelhouse') | ||
for job_id in job_ids: | ||
r = requests.get('{}/buildjobs/{}/artifacts'.format(api_url, job_id), headers=headers) | ||
r.raise_for_status() | ||
for artifact in r.json(): | ||
url = '{}/buildjobs/{}/artifacts/{}'.format(api_url, job_id, artifact['fileName']) | ||
r = requests.get(url, headers=headers, stream=True) | ||
r.raise_for_status() | ||
file_name = 'wheelhouse/' + os.path.basename(artifact['fileName']) | ||
with open(file_name, 'wb') as f: | ||
for chunk in r.iter_content(None): | ||
f.write(chunk) | ||
|
||
print('Downloaded ' + f.name) |
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 |
---|---|---|
|
@@ -2,7 +2,11 @@ | |
.project | ||
.pydevproject | ||
.settings | ||
.vscode/ | ||
*.egg-info/ | ||
Debug/ | ||
build/ | ||
dist/ | ||
__pycache__/ | ||
MANIFEST | ||
|
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,81 @@ | ||
dist: xenial | ||
language: python | ||
|
||
env: | ||
global: | ||
- PYTHONUNBUFFERED=1 | ||
- APPVEYOR_SLUG=python-q3huff | ||
- APPVEYOR_ACCOUNT=jkent | ||
# APPVEYOR_TOKEN | ||
- secure: "vKfQSVJIcx01th0MCk6bRDixN9ln42eTFUTQViZWAPUQxq/TZ/62UdEkKEO0h7ORxCB1XWqUp0KfTLLsUUSH/ilLgY787VXzxmCWQcoierINXCTDiU6eK9qPAYc3b1bOtijsurjXxYv+yruotx6r7jeXzLozt+dR25sQgYiThNQ/IQ5WlhFw9Tt7SPbyM3JtUIXt8XgrPp3raexGdgpqLSfOBeOnuYCqPCobgIU1+emY2Nd1ivsX9xQmgR5xWdbBkk2cRSIaUjV7FWz+t4y/VvB+bRJolk8W7UHGfKje0Y0KxL3gUgi8ffKAWxFGbcMEkd53TZquHko8LA6FxQ1vz+oMtJMry29dCysqV33hfxbhqjdW4XFIAFimmPI/4mzBB070D+YUxu4Ho/RqDDsXeHiS/yD+Ze/6labgSXLKdlMtMY4FoGu1Wy8xg3gmSpje2D/X7pD3L6H0OgRhRaQck+ab8Ng1zADPg1uUQvyeNvXqiU+N1jzU0WS/vHA55Z7WP0ENCJUWZn8ONxK8FznQqv4xtMzqSY9iMnqX6vD0Du67bNv8/3yGtWhy4OAluVaR77trIFy7O7/uP3oT3zyOwRrUqta7L1GEwRCTHutOS0atVxs3idISN5HclrM5/CHDIUijM/MhoWl8PEtILCj32mPB/9N4jjUpIWh2vOY3hg4=" | ||
- AWS_ACCESS_KEY_ID=AKIA5LW6HA4HS6R3LISB | ||
# AWS_SECRET_ACCESS_KEY | ||
- secure: "B0kfDbWvL2ctL2gRFas1F+wfdovXNqSIF0QIaA/Gn+Q9JF/8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ZMPci3Yxlexs+Fzhk+mo5o7CvDg2gz23VPdlD8l0w25nNA09KG8nSM+L+lve9BslGSWGtCJ6AqTmpQB1KYrzwYYzizWf/khD1ZhzPODwtbJGPbOC62vWxoh22wXGkJaX4+PuzXXRAdA/WmOn7kNcvdwVQ8OMV5ejmysZDuQxUj8yTad3x23JYBxDcvaHbflD9De/EarcmWM+4huv72Gg24H9KRhp+hRnpwBXcRtTZjXLvJrvtRofTyFeIQ2+oPO/DxOtixbJc7KRNkITbrrPbSgEbxrSA=" | ||
|
||
stages: | ||
- name: test | ||
- name: build sdist | ||
if: type = push AND tag =~ ^v\d+\.\d+\.\d+ | ||
- name: build wheels | ||
if: type = push AND tag =~ ^v\d+\.\d+\.\d+ | ||
- name: deploy to pypi | ||
if: type = push AND tag =~ ^v\d+\.\d+\.\d+ | ||
|
||
python: | ||
- '3.4' | ||
- '3.5' | ||
- '3.6' | ||
- '3.7' | ||
|
||
install: | ||
- pip install -e .[test] | ||
|
||
script: pytest | ||
|
||
jobs: | ||
fast_finish: true | ||
include: | ||
- stage: build sdist | ||
before_install: &setup_s3 | ||
- pip install awscli | ||
- mkdir dist | ||
install: skip | ||
script: python setup.py sdist | ||
after_success: | ||
- aws s3 rm --recursive s3://python-q3huff/dist | ||
- aws s3 sync dist s3://python-q3huff/dist | ||
|
||
- stage: build wheels | ||
env: OS=LINUX | ||
sudo: required | ||
before_install: *setup_s3 | ||
install: skip | ||
script: docker run --rm -it -v $(pwd):/io -w /io quay.io/pypa/manylinux1_x86_64 .ci/build_linux_wheels.sh | ||
after_success: aws s3 sync wheelhouse s3://python-q3huff/dist | ||
|
||
- stage: build wheels | ||
os: osx | ||
language: generic | ||
env: OS=MACOS | ||
before_install: *setup_s3 | ||
install: skip | ||
script: .ci/build_macos_wheels.sh | ||
after_success: aws s3 sync dist s3://python-q3huff/dist | ||
|
||
- stage: build wheels | ||
env: OS=WINDOWS | ||
before_install: *setup_s3 | ||
install: pip install requests | ||
script: .ci/build_windows_wheels.py | ||
after_success: aws s3 sync wheelhouse s3://python-q3huff/dist | ||
|
||
- stage: deploy to pypi | ||
before_install: *setup_s3 | ||
install: pip install twine | ||
script: | ||
- aws s3 sync s3://python-q3huff/dist dist | ||
- twine upload dist/* | ||
- aws s3 rm --recursive s3://python-q3huff/dist |
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,22 @@ | ||
version: 1.0.{build} | ||
clone_depth: 50 # The same depth Travis has | ||
|
||
environment: | ||
matrix: | ||
- PYTHON: "C:\\Python35" | ||
- PYTHON: "C:\\Python35-x64" | ||
- PYTHON: "C:\\Python36" | ||
- PYTHON: "C:\\Python36-x64" | ||
- PYTHON: "C:\\Python37" | ||
- PYTHON: "C:\\Python37-x64" | ||
|
||
install: | ||
- "%PYTHON%\\python.exe -m pip install wheel" | ||
|
||
build: off | ||
|
||
after_test: | ||
- "%PYTHON%\\python.exe setup.py bdist_wheel" | ||
|
||
artifacts: | ||
- path: dist\* |
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
Oops, something went wrong.