Skip to content

Commit

Permalink
Improved MacOS Python build (apache#4039)
Browse files Browse the repository at this point in the history
### Motivation

Fixed the Python wheels build on MacOS using vagrant.
 * Use images with pre-installed XCode and dependencies
 * Unified Py 2 and 3 in a single VM
  • Loading branch information
merlimat authored and sijie committed Apr 13, 2019
1 parent 4322a66 commit 6544be5
Show file tree
Hide file tree
Showing 23 changed files with 113 additions and 409 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ deployment/terraform-ansible/aws/terraform.tfstate.backup
**/.vagrant


pulsar-client-cpp/python/pkg/osx/**/*.bak
pulsar-client-cpp/python/pkg/osx/**/build.sh
pulsar-client-cpp/python/pkg/osx/**/*.whl
pulsar-client-cpp/python/pkg/osx/**/*.template2
pulsar-client-cpp/python/pkg/osx/*/*.bak
pulsar-client-cpp/python/pkg/osx/*/*.whl
pulsar-client-cpp/python/wheelhouse

# CI generated files
Expand Down
61 changes: 0 additions & 61 deletions pulsar-client-cpp/python/pkg/osx/build.sh.template

This file was deleted.

56 changes: 28 additions & 28 deletions pulsar-client-cpp/python/pkg/osx/generate-all-wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@
# under the License.
#


set -e

printf "== Generate python 2.7 osx packages ==\n"

cd osx-10.11-python2.7
sh generate-wheel-file.sh
cd ..

cd osx-10.12-python2.7
sh generate-wheel-file.sh
cd ..

cd osx-10.13-python2.7
sh generate-wheel-file.sh
cd ..

printf "== Generate python 3.6 osx packages ==\n"

cd osx-10.11-python3.6
sh generate-wheel-file.sh
cd ..

cd osx-10.12-python3.6
sh generate-wheel-file.sh
cd ..

cd osx-10.13-python3.6
sh generate-wheel-file.sh
cd ..
if [ "$#" -lt 1 ]; then
echo "Need to specify git tag as argument"
exit 1
fi

export GIT_TAG=$1
export GIT_REPO=${2:-https://github.com/apache/pulsar.git}

echo "GIT_TAG: '$GIT_TAG'"
echo "GIT_REPO: '$GIT_REPO'"

OSX_VERSIONS=(
osx-10.12
osx-10.13
osx-10.14
)

for osx in ${OSX_VERSIONS[@]}; do
echo ""
echo "------------- BUILDING PYTHON WHEELS FOR $osx ---------------------"

pushd $osx
rm -rf *.whl
vagrant up --provision
vagrant scp :/Users/vagrant/pulsar/pulsar-client-cpp/python/dist/*.whl .
vagrant halt -f
popd
done
28 changes: 0 additions & 28 deletions pulsar-client-cpp/python/pkg/osx/osx-10.11-python2.7/Vagrantfile

This file was deleted.

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions pulsar-client-cpp/python/pkg/osx/osx-10.11-python3.6/Vagrantfile

This file was deleted.

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions pulsar-client-cpp/python/pkg/osx/osx-10.12-python2.7/Vagrantfile

This file was deleted.

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions pulsar-client-cpp/python/pkg/osx/osx-10.12-python3.6/Vagrantfile

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6544be5

Please sign in to comment.