Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix versions in requirements.txt for python 3.5 and 3.9 #20507

Merged
merged 5 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions libbeat/tests/system/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ more-itertools==8.4.0
ordered-set==3.1.1
packaging==20.4
parameterized==0.7.0
Pillow==7.2.0
pluggy==0.13.1
py==1.9.0
pycodestyle==2.4.0
Expand All @@ -45,4 +44,4 @@ toml==0.10.1
urllib3==1.24.2
wcwidth==0.2.5
websocket-client==0.47.0
zipp==3.1.0
zipp>=1.2.0,<=3.1.0
37 changes: 37 additions & 0 deletions script/check_python_requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
#
# Helper script to check that packages defined in a requirements.txt
# file can be installed in different Python versions, it checks by
# default the requirements.txt file for libbeat tests.
#
# Usage: check_python_requirements.sh /path/to/requirements.txt
#
# VERSIONS environment variable can be set to a space-separated list
# of versions of python to test with.
#

set -e

BEATS_PATH=$(realpath $(dirname ${BASH_SOURCE[0]})/..)

VERSIONS=${VERSIONS:-3.5 3.6 3.7 3.8 3.9-rc}
REQUIREMENTS=${1:-${BEATS_PATH}/libbeat/tests/system/requirements.txt}

if [ ! -f $REQUIREMENTS ]; then
echo "Requirements file doesn't exist: $REQUIREMENTS"
exit -1
fi

REQUIREMENTS=$(realpath $REQUIREMENTS)
ChrsMark marked this conversation as resolved.
Show resolved Hide resolved

echo "Versions: $VERSIONS"
echo "Requirements file: $REQUIREMENTS"

for version in $VERSIONS; do
echo "==== Version: $version"

docker run -it --rm -v $REQUIREMENTS:/requirements.txt python:$version \
python -m pip install -q -r /requirements.txt

echo "==== OK"
done