Skip to content

Commit

Permalink
wheels fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lsbardel committed Dec 29, 2017
1 parent 352ba19 commit 058997e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
30 changes: 16 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ clean: ## clean build directory and cache files
find . -name '*.pyc' | xargs rm -rf
find . -name '.DS_Store' | xargs rm -rf


compile: ## clean and build extension
make clean
$(PYTHON) setup.py build_ext

compile-inplace:## clean and build extension in place (for development)
compile: ## clean and build extension in place (for development)
make clean
$(PYTHON) setup.py build_ext -i


docs: ## build html documentation
mkdir -p build/docs/html
$(PYTHON) -m sphinx -a -b html $(DOCS_SOURCE) $(DOCS_BUILDDIR)/html
Expand All @@ -36,18 +30,13 @@ test: ## flake8 and unit-tests with uvloop
flake8
$(PYTHON) -W ignore setup.py test -q --io uv

testinstalled:
$(PYTHON) -W ignore runtests.py

testpy: ## pure python library unit tests (PULSARPY=yes)
export PULSARPY=yes
$(PYTHON) -W ignore setup.py test -q


coverage:
coverage: ## run tunit tests with coverage
export PULSARPY=yes; $(PYTHON) -W ignore setup.py test --coverage -q


testall:
flake8
$(PYTHON) -W ignore setup.py test -q
Expand All @@ -57,13 +46,26 @@ testall:
pypi-check: ## check if current version is valid for a new pypi release
$(PYTHON) setup.py pypi --final

wheels-mac: ## create wheels for Mac OSX
wheels: ## build platform wheels
make clean
$(PYTHON) setup.py bdist_wheel

wheels-mac: ## create wheels for Mac OSX **must be run from a mac**
export PYMODULE=pulsar; export WHEEL=macosx; export CI=true; ./pulsar/cmds/build-wheels.sh

wheels-linux: ## create linux wheels for python 3.5 & 3.6
rm -rf wheelhouse
$(PYTHON) setup.py linux_wheels --py 3.5,3.6

wheels-test: ## run tests using wheels distribution
rm -rf tmp
mkdir tmp
cp -r tests tmp/tests
cp -r examples tmp/examples
cp runtests.py tmp/runtests.py
cd tmp && $(PYTHON) runtests.py
rm -rf tmp

wheels-upload: ## upload wheels to s3
$(PYTHON) setup.py s3data --bucket fluidily --key wheelhouse --files "wheelhouse/*.whl"

Expand Down
12 changes: 5 additions & 7 deletions pulsar/cmds/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ${PIP} install --upgrade pip wheel
${PIP} install --upgrade setuptools cython
${PIP} install -r ${IOPATH}/requirements/ci.txt
${PIP} install -r ${IOPATH}/requirements/hard.txt
${PIP} wheel ${IOPATH} -w ${DIST}
make -C ${IOPATH} PYTHON=${PYTHON} wheels

if [ $BUNDLE_WHEEL ]
then
Expand All @@ -27,13 +27,11 @@ find ${DIST} -maxdepth 1 -type f ! -name ${WHEELRE} -print0 | xargs -0 rm -rf
ls ${DIST}

echo
echo "Clear python cache"
find ${IOPATH} -type d -name __pycache__ -print0 | xargs -0 rm -rf

echo
echo -n "Test: "
echo "unittests"
${PIP} install ${PYMODULE} --no-index -f file://${DIST}
${PIP} uninstall ${PYMODULE} -y
${PIP} install ${PYMODULE} --no-index -f file://${DIST}
make -C ${IOPATH} PYTHON=${PYTHON} testinstalled
make -C ${IOPATH} PYTHON=${PYTHON} PIP=${PIP} wheels-test

mkdir -p ${IOPATH}/wheelhouse
mv ${IOPATH}/dist/*.whl ${IOPATH}/wheelhouse/
Expand Down
1 change: 1 addition & 0 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
docker
botocore
httptools

0 comments on commit 058997e

Please sign in to comment.