Skip to content

Commit

Permalink
Add wheel build
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Apr 16, 2016
1 parent b6c9b92 commit 0acfd21
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@ target/

#Ipython Notebook
.ipynb_checkpoints

.develop
.install-deps
wheelhouse
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@ flake: .install-deps
# python setup.py check -rms
flake8 multidict
if python -c "import sys; sys.exit(sys.version_info < (3,5))"; then \
flake8 examples tests; \
flake8 tests; \
fi


.develop: .install-deps $(shell find multidict -type f)
pip install -e .
touch .develop

test: flake .develop
rmcache:
rm -rf tests/__pycache__


test: flake .develop rmcache
py.test -q ./tests/

vtest: flake .develop
vtest: flake .develop rmcache
py.test -s -v ./tests/

cov cover coverage:
tox

cov-dev: .develop
cov-dev: .develop rmcache
py.test --cov=multidict --cov-report=term --cov-report=html tests
@echo "open file://`pwd`/coverage/index.html"

cov-dev-full: .develop
cov-dev-full: .develop rmcache
AIOHTTPMULTIDICT_NO_EXTENSIONS=1 py.test --cov=multidict --cov-append tests
py.test --cov=multidict --cov-report=term --cov-report=html tests
@echo "open file://`pwd`/coverage/index.html"
Expand Down Expand Up @@ -66,4 +70,9 @@ install:
pip install -U pip
pip install -Ur requirements-dev.txt

wheel_x64:
docker pull quay.io/pypa/manylinux1_x86_64
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/build-wheels.sh
ls wheelhouse/

.PHONY: all build venv flake test vtest testloop cov clean doc
21 changes: 21 additions & 0 deletions build-wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
PYTHON_VERSIONS="cp34-cp34m cp35-cp35m"

# Compile wheels
for PYTHON in ${PYTHON_VERSIONS}; do
/opt/python/${PYTHON}/bin/pip install -r /io/requirements-wheel.txt
/opt/python/${PYTHON}/bin/pip wheel /io/ -w wheelhouse/
done

# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
auditwheel repair $whl -w /io/wheelhouse/
done

# Install packages and test
for PYTHON in ${PYTHON_VERSIONS}; do
/opt/python/${PYTHON}/bin/pip install multidict --no-index -f wheelhouse
rm -rf /io/tests/__pycache__
/opt/python/${PYTHON}/bin/py.test /io/tests
rm -rf /io/tests/__pycache__
done
3 changes: 1 addition & 2 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
-r requirements-wheel.txt
pip
flake8
pyflakes>=1.0.0
coverage
sphinx
alabaster>=0.6.2
cython
tox
sphinxcontrib-newsfeed
pytest
pytest-cov
pygments
-e .
3 changes: 3 additions & 0 deletions requirements-wheel.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cython
pytest

0 comments on commit 0acfd21

Please sign in to comment.