From 1f26177becfc0fe9ac60d4eca001cb7cebe8455d Mon Sep 17 00:00:00 2001 From: Ondřej Nosek Date: Jan 22 2025 02:44:20 +0000 Subject: Fixing unittests for py36 There is an issue with the newest pycurl library in PyPI. Use the older one for this environment. 'rpm-py-installer' is failing too, replace it with 'rpm'. Signed-off-by: Ondřej Nosek --- diff --git a/Jenkinsfile b/Jenkinsfile index 083d584..11d940a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,7 +50,7 @@ git fetch proposed git checkout "origin/$params.BRANCH_TO" git merge --no-ff "proposed/$params.BRANCH" -m "Merge PR" -podman run --rm -v .:/src:Z quay.io/exd-guild-source-tools/rpkg-test:latest tox -e py36,py39,py311,flake8,bandit --workdir /tmp/tox ${TOX_POSARGS} +podman run --rm -v .:/src:Z quay.io/exd-guild-source-tools/rpkg-test:latest tox -e py36,py39,py312,py313,flake8,bandit --workdir /tmp/tox ${TOX_POSARGS} # disabled py27 environment for now; keep just flake8 for Python 2 podman run --rm -v .:/src:Z quay.io/exd-guild-source-tools/rpkg-test-py2:latest tox -e flake8python2 --workdir /tmp/tox ${TOX_POSARGS} """ diff --git a/pyproject.toml b/pyproject.toml index dc4a285..606dddd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,9 +32,10 @@ dependencies = [ "cccolutils >= 1.4", "GitPython", "koji >= 1.15", - "pycurl >= 7.19", + "pycurl", "PyYAML", "requests", + "rpm", "six >= 1.9.0", ] diff --git a/requirements/pypi.txt b/requirements/pypi.txt index 350454e..a1aa87d 100644 --- a/requirements/pypi.txt +++ b/requirements/pypi.txt @@ -3,9 +3,10 @@ cccolutils >= 1.4 GitPython koji >= 1.15 -pycurl >= 7.19 +pycurl six >= 1.9.0 requests +rpm PyYAML argcomplete diff --git a/requirements/pypi_py36.txt b/requirements/pypi_py36.txt new file mode 100644 index 0000000..73654cf --- /dev/null +++ b/requirements/pypi_py36.txt @@ -0,0 +1 @@ +pycurl<7.45.4 diff --git a/tox.ini b/tox.ini index 2638246..4e7e153 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,6 @@ basepython= bandit: {env:TOXPYTHON:python3} deps = - rpm-py-installer -r{toxinidir}/requirements/pypi.txt -r{toxinidir}/requirements/test-pypi.txt @@ -25,6 +24,11 @@ commands = setenv= PYCURL_SSL_LIBRARY=openssl +[testenv:py36] +deps = + {[testenv]deps} + -c{toxinidir}/requirements/pypi_py36.txt + [testenv:py39] # allow gi & libmodulemd for flatpak tests. System libraries are available for Python 3.9 sitepackages=true