From 5a668201abc6305eeeeab3b61a44e429529d36e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Mon, 2 May 2022 08:31:49 +0200 Subject: [PATCH] Issue #48 - Collect Python dependencies in requirements-dev.txt (#403) --- .github/workflows/build.yaml | 20 +++++++------------- README.adoc | 15 +++++++++++++++ requirements-dev.txt | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 requirements-dev.txt diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3697f1a5f..f3c9edcbe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -109,7 +109,6 @@ jobs: run: python -m pip install setuptools wheel tox - name: Install Linux build dependencies - if: ${{ runner.os == 'Linux' }} run: | sudo apt update; sudo apt install -y swig libpython3-dev libsasl2-dev libjsoncpp-dev libwebsockets-dev libnghttp2-dev ccache ninja-build pixz libbenchmark-dev @@ -210,17 +209,16 @@ jobs: python-version: 3.6 architecture: x64 - - name: Install Python runtime/test dependencies - run: python -m pip install tox quart selectors h2 grpcio protobuf websockets pytest - - name: Install Linux runtime/test dependencies - if: ${{ runner.os == 'Linux' }} run: | sudo apt update; sudo apt install -y libsasl2-2 libsasl2-modules sasl2-bin libjsoncpp1 libwebsockets15 libbenchmark1 pixz bubblewrap curl ncat gdb elfutils findutils file python3-dbg - name: Unpack archive run: tar -I pixz -xf archive.tar.xz + - name: Install Python runtime/test dependencies + run: python -m pip install -r ${{github.workspace}}/skupper-router/requirements-dev.txt + - name: install qpid-proton python wheel run: python -m pip install ${ProtonBuildDir}/python/pkgs/python_qpid_proton*.whl @@ -376,7 +374,6 @@ jobs: dnf config-manager --set-enabled powertools - name: Install Linux build dependencies - if: ${{ runner.os == 'Linux' }} run: | dnf install -y gcc gcc-c++ cmake libuuid-devel openssl-devel cyrus-sasl-devel cyrus-sasl-plain swig python3-devel python3-pip make libwebsockets-devel libnghttp2-devel ccache libasan libubsan libtsan @@ -447,15 +444,13 @@ jobs: if: ${{ always() && runner.os == 'Linux' }} run: env -0 | sort -z | tr '\0' '\n' - - name: Install Python runtime/test dependencies - run: python3 -m pip install tox quart selectors h2 protobuf websockets pytest + - name: Upgrade pip + run: python3 -m pip install --upgrade pip - - name: Install Python runtime/test dependencies (Fedora) - if: ${{ matrix.container == 'fedora' }} - run: python3 -m pip install grpcio + - name: Install Python runtime/test dependencies + run: python3 -m pip install -r ${{github.workspace}}/skupper-router/requirements-dev.txt - name: Install Linux runtime/test dependencies - if: ${{ runner.os == 'Linux' }} run: | dnf install -y curl nmap-ncat gdb binutils elfutils elfutils-debuginfod-client findutils file dnf debuginfo-install -y python3 @@ -533,7 +528,6 @@ jobs: path: 'qpid-proton' - name: Install Linux build dependencies - if: ${{ runner.os == 'Linux' }} run: | sudo apt update; sudo apt install -y python3-qpid-proton libpython3-dev ninja-build diff --git a/README.adoc b/README.adoc index 02bf06eff..28e3e9d54 100644 --- a/README.adoc +++ b/README.adoc @@ -92,6 +92,21 @@ $ ./run.py === Test-only dependencies +.Install package dependencies (Fedora) +[source, shell script] +---- +dnf install curl nmap-ncat +---- + +.Install Python test dependencies from `requirements-dev.txt` +[source, shell script] +---- +python3 -m pip install --user --upgrade pip +python3 -m pip install --user -r ./requirements-dev.txt +---- + +==== Description of the individual dependencies + The HTTP2 system tests (`tests/system_tests_http2.py`) use the Python Quart and hyper-h2 frameworks to start a HTTP2 server. The HTTP2 system tests only runs if diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 000000000..6241d39dc --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,36 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License +# + +# https://pip.pypa.io/en/stable/reference/requirements-file-format + +--prefer-binary + +setuptools +virtualenv +wheel +tox + +pytest + +grpcio +h2 +protobuf +quart +selectors +websockets