From 7ad6738610f0cf80989eed308eda773a3610b202 Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 09:23:15 +0200 Subject: [PATCH 1/5] ci(pytest): invoke `pytest` directly instead of `setup.py test` (#100) 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 8c6bad3..bf8bd83 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -65,7 +65,7 @@ check_sphinx () { } check_pytest () { - python setup.py test + pytest } check_dockerfile () { diff --git a/setup.cfg b/setup.cfg index 06a920e..d674b50 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 14dec1b96cb9be542a4e99a84dfc85819eae5c1f Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 09:28:24 +0200 Subject: [PATCH 2/5] build(python): remove deprecated `pytest-runner` (#100) Closes reanahub/reana#814 --- setup.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/setup.py b/setup.py index 58f25ec..0b399fc 100644 --- a/setup.py +++ b/setup.py @@ -45,11 +45,6 @@ continue extras_require["all"].extend(reqs) - -setup_requires = [ - "pytest-runner>=2.7", -] - install_requires = [ "reana-commons[snakemake_reports]>=0.95.0a2,<0.96.0", ] @@ -85,7 +80,6 @@ }, python_requires=">=3.8", extras_require=extras_require, - setup_requires=setup_requires, tests_require=tests_require, classifiers=[ "Development Status :: 3 - Alpha", From 9f37894a1faf9ef60cb62d8a50471ad89a8fb6b9 Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 09:38:51 +0200 Subject: [PATCH 3/5] build(python): use optional deps instead of `tests_require` (#100) Closes reanahub/reana#814 --- setup.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 0b399fc..b1961ee 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", @@ -33,7 +29,9 @@ "Sphinx>=1.5.1", "sphinx-rtd-theme>=0.1.9", ], - "tests": tests_require, + "tests": [ + "pytest-reana>=0.95.0a2,<0.96.0", + ], "xrootd": [ "xrootd==5.6.0", ], @@ -80,7 +78,6 @@ }, python_requires=">=3.8", extras_require=extras_require, - tests_require=tests_require, classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Web Environment", From 01883da42bc2f77c0e3e59dfbca54682a2f51405 Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 09:52:29 +0200 Subject: [PATCH 4/5] build(python): add minimal `pyproject.toml` (#100) 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 0000000..3eb6dd5 --- /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 2dd079e3289181e75ebd9fc11193397e8407b8ec Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Tue, 30 Jul 2024 13:49:01 +0200 Subject: [PATCH 5/5] build(docker): pin setuptools to v70 (#100) 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 d82ad58..4320317 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,7 +60,7 @@ RUN apt-get update -y && \ libxrootd-client-dev \ xrootd-client) \ fi && \ - 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 \ cmake \