Marton Greber created KUDU-3621: ----------------------------------- Summary: Create Python library compatibility test script Key: KUDU-3621 URL: https://issues.apache.org/jira/browse/KUDU-3621 Project: Kudu Issue Type: Improvement Components: build, python Reporter: Marton Greber
It would be nice to have a script checked in $KUDU_HOME/build-support which would test all the supported Python versions, maybe check that the packaging/package installation works as expected. things to test: * build from source, and run all tests * build from source the sdist (what we upload to pypi), then try to install that package in a clean env (maybe on could also put in running the python example as well) * handle ubuntu and macos: on ubuntu we have somewhat well defined version support, however on macos testing the lower end of the support range is not feasible so far i've been using a simple script when running version compatibility tests. Maybe this can serve as a starting point for creating a nice script. My script for testing on macos for example: {code:java} #!/bin/bash set -eou pipefail export DYLD_LIBRARY_PATH=$KUDU_HOME/build/debug/lib:$KUDU_HOME/build/debug/lib/exported version=$1 kudu_python_package_filename="kudu_python-1.18.0.dev0.tar.gz" cd $KUDU_HOME/python rm -rf venv/ ### Testing dev env python$version --version echo "testing if development setup works" rm -rf ./build/* rm -rf kudu_python.egg-info echo "creating venv" virtualenv -p python$version venv source ./venv/bin/activate python -m pip install -r requirements_dev.txt python setup.py test deactivate rm -rf ./venv ### Test Packaging echo "build the source dist in a clean env" rm -rf ./dist/* echo "creating venv" virtualenv -p python$version venv source ./venv/bin/activate python setup.py sdist deactivate rm -rf ./venv echo "cleaned up venv" echo "install the sdist into a clean venv" echo "creating venv" virtualenv -p python$version venv source ./venv/bin/activate pip install ./dist/$kudu_python_package_filename echo "executing pip list:" pip list deactivate rm -rf ./venv {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)