From bd6762fc3ef1a79d5354ac167e0e08383eec9d6c Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 09:22:50 +0200 Subject: [PATCH 1/5] ci(pytest): invoke `pytest` directly instead of `setup.py test` (#696) Closes reanahub/reana#814 --- run-tests.sh | 2 +- setup.cfg | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index 3396e016..b6ab3190 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -104,7 +104,7 @@ check_pytest () { clean_old_db_container start_db_container trap clean_old_db_container SIGINT SIGTERM SIGSEGV ERR - python setup.py test + pytest stop_db_container } diff --git a/setup.cfg b/setup.cfg index eabef9db..181db28c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,9 +4,6 @@ # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. -[aliases] -test = pytest - [build_sphinx] source-dir = docs/ build-dir = docs/_build From 20431fe5f3fc0e451afa1f4f8e6734bd41b84acc Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 09:27:25 +0200 Subject: [PATCH 2/5] build(python): remove deprecated `pytest-runner` (#696) Closes reanahub/reana#814 --- setup.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setup.py b/setup.py index 8b3141a6..2b0b4972 100644 --- a/setup.py +++ b/setup.py @@ -46,10 +46,6 @@ continue extras_require["all"].extend(reqs) -setup_requires = [ - "pytest-runner>=2.7", -] - install_requires = [ # These bounds on Flask/Werkzeug are needed because Werkzeug v2.1 removes `safe_str_cmp`, # which is needed by Flask-Login. This was fixed in Flask-Login v0.6.0 (see the issue @@ -142,7 +138,6 @@ python_requires=">=3.8", extras_require=extras_require, install_requires=install_requires, - setup_requires=setup_requires, tests_require=tests_require, classifiers=[ "Development Status :: 3 - Alpha", From 9c2a31f154c4d60d5a1887ca69d7f30525d482f4 Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 09:38:28 +0200 Subject: [PATCH 3/5] build(python): use optional deps instead of `tests_require` (#696) Closes reanahub/reana#814 --- setup.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 2b0b4972..7f6ee3e6 100644 --- a/setup.py +++ b/setup.py @@ -18,10 +18,6 @@ readme = open("README.md").read() history = open("CHANGELOG.md").read() -tests_require = [ - "pytest-reana>=0.95.0a2,<0.96.0", -] - extras_require = { "debug": [ "wdb", @@ -37,7 +33,9 @@ "sphinxcontrib-redoc>=1.5.1", "sphinx-click>=1.0.4", ], - "tests": tests_require, + "tests": [ + "pytest-reana>=0.95.0a2,<0.96.0", + ], } extras_require["all"] = [] @@ -138,7 +136,6 @@ python_requires=">=3.8", extras_require=extras_require, install_requires=install_requires, - tests_require=tests_require, classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Web Environment", From 631372081660d7c8e831b351c3db0123cc76c911 Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 09:51:42 +0200 Subject: [PATCH 4/5] build(python): add minimal `pyproject.toml` (#696) Closes reanahub/reana#814 --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..3eb6dd50 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +# This file is part of REANA. +# Copyright (C) 2024 CERN. +# +# REANA is free software; you can redistribute it and/or modify it +# under the terms of the MIT License; see LICENSE file for more details. + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" From c1b4b710fee23c2215a5a884bedbd00c90881596 Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 11:18:03 +0200 Subject: [PATCH 5/5] build(docker): pin setuptools to v70 (#696) Fix `packaging.version.InvalidVersion` when installing the Python dependencies. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 13704db8..02b59bb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ RUN apt-get update -y && \ python3.8 \ python3.8-dev \ vim-tiny && \ - pip install --no-cache-dir --upgrade pip setuptools && \ + pip install --no-cache-dir --upgrade pip 'setuptools<71' && \ pip install --no-cache-dir -r /code/requirements.txt && \ apt-get remove -y \ gcc \