From 82db6aca07cdef1ae3056f4839b3e8837611020f Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Wed, 20 Sep 2023 17:22:23 +0200 Subject: [PATCH 1/4] fix pip install for older setuptools --- pyproject.toml | 3 +-- setup.cfg | 8 ++++---- src/eessi/__init__.py | 1 + src/eessi/testsuite/__init__.py | 0 {eessi => src/eessi}/testsuite/common_config.py | 0 {eessi => src/eessi}/testsuite/constants.py | 0 {eessi => src/eessi}/testsuite/hooks.py | 0 {eessi => src/eessi}/testsuite/tests/apps/gromacs.py | 0 .../testsuite/tests/apps/tensorflow/src/mnist_setup.py | 0 .../eessi}/testsuite/tests/apps/tensorflow/src/tf_test.py | 0 .../eessi}/testsuite/tests/apps/tensorflow/tensorflow.py | 0 {eessi => src/eessi}/testsuite/utils.py | 0 12 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 src/eessi/__init__.py create mode 100644 src/eessi/testsuite/__init__.py rename {eessi => src/eessi}/testsuite/common_config.py (100%) rename {eessi => src/eessi}/testsuite/constants.py (100%) rename {eessi => src/eessi}/testsuite/hooks.py (100%) rename {eessi => src/eessi}/testsuite/tests/apps/gromacs.py (100%) rename {eessi => src/eessi}/testsuite/tests/apps/tensorflow/src/mnist_setup.py (100%) rename {eessi => src/eessi}/testsuite/tests/apps/tensorflow/src/tf_test.py (100%) rename {eessi => src/eessi}/testsuite/tests/apps/tensorflow/tensorflow.py (100%) rename {eessi => src/eessi}/testsuite/utils.py (100%) diff --git a/pyproject.toml b/pyproject.toml index 65cb01e9..c9b42b0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,5 @@ requires-python = ">=3.6" "Bug Tracker" = "https://github.com/EESSI/test-suite/issues" [tool.setuptools.packages.find] -where = ["eessi/testsuite"] +where = ["src"] include = ["eessi*"] -namespaces = true diff --git a/setup.cfg b/setup.cfg index b6329a2f..ecc8d491 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,11 +13,11 @@ project_urls = install_requires = setuptools python_requires = >=3.6 -packages = find: package_dir = - =eessi/testsuite + =src +packages = find: +namespace_packages = eessi [options.packages.find] -where = eessi/testsuite +where = src include = eessi* -namespaces = true diff --git a/src/eessi/__init__.py b/src/eessi/__init__.py new file mode 100644 index 00000000..5284146e --- /dev/null +++ b/src/eessi/__init__.py @@ -0,0 +1 @@ +__import__("pkg_resources").declare_namespace(__name__) diff --git a/src/eessi/testsuite/__init__.py b/src/eessi/testsuite/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/eessi/testsuite/common_config.py b/src/eessi/testsuite/common_config.py similarity index 100% rename from eessi/testsuite/common_config.py rename to src/eessi/testsuite/common_config.py diff --git a/eessi/testsuite/constants.py b/src/eessi/testsuite/constants.py similarity index 100% rename from eessi/testsuite/constants.py rename to src/eessi/testsuite/constants.py diff --git a/eessi/testsuite/hooks.py b/src/eessi/testsuite/hooks.py similarity index 100% rename from eessi/testsuite/hooks.py rename to src/eessi/testsuite/hooks.py diff --git a/eessi/testsuite/tests/apps/gromacs.py b/src/eessi/testsuite/tests/apps/gromacs.py similarity index 100% rename from eessi/testsuite/tests/apps/gromacs.py rename to src/eessi/testsuite/tests/apps/gromacs.py diff --git a/eessi/testsuite/tests/apps/tensorflow/src/mnist_setup.py b/src/eessi/testsuite/tests/apps/tensorflow/src/mnist_setup.py similarity index 100% rename from eessi/testsuite/tests/apps/tensorflow/src/mnist_setup.py rename to src/eessi/testsuite/tests/apps/tensorflow/src/mnist_setup.py diff --git a/eessi/testsuite/tests/apps/tensorflow/src/tf_test.py b/src/eessi/testsuite/tests/apps/tensorflow/src/tf_test.py similarity index 100% rename from eessi/testsuite/tests/apps/tensorflow/src/tf_test.py rename to src/eessi/testsuite/tests/apps/tensorflow/src/tf_test.py diff --git a/eessi/testsuite/tests/apps/tensorflow/tensorflow.py b/src/eessi/testsuite/tests/apps/tensorflow/tensorflow.py similarity index 100% rename from eessi/testsuite/tests/apps/tensorflow/tensorflow.py rename to src/eessi/testsuite/tests/apps/tensorflow/tensorflow.py diff --git a/eessi/testsuite/utils.py b/src/eessi/testsuite/utils.py similarity index 100% rename from eessi/testsuite/utils.py rename to src/eessi/testsuite/utils.py From abd73846873248c087282df026c299d236d0b8b1 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Wed, 20 Sep 2023 17:43:36 +0200 Subject: [PATCH 2/4] make sure all subdirs are installed --- src/eessi/testsuite/tests/__init__.py | 0 src/eessi/testsuite/tests/apps/__init__.py | 0 src/eessi/testsuite/tests/apps/tensorflow/__init__.py | 0 src/eessi/testsuite/tests/apps/tensorflow/src/__init__.py | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/eessi/testsuite/tests/__init__.py create mode 100644 src/eessi/testsuite/tests/apps/__init__.py create mode 100644 src/eessi/testsuite/tests/apps/tensorflow/__init__.py create mode 100644 src/eessi/testsuite/tests/apps/tensorflow/src/__init__.py diff --git a/src/eessi/testsuite/tests/__init__.py b/src/eessi/testsuite/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/eessi/testsuite/tests/apps/__init__.py b/src/eessi/testsuite/tests/apps/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/eessi/testsuite/tests/apps/tensorflow/__init__.py b/src/eessi/testsuite/tests/apps/tensorflow/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/eessi/testsuite/tests/apps/tensorflow/src/__init__.py b/src/eessi/testsuite/tests/apps/tensorflow/src/__init__.py new file mode 100644 index 00000000..e69de29b From 160b66b04b9d07265df5b7d195185a7e9fc46732 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Wed, 20 Sep 2023 18:03:46 +0200 Subject: [PATCH 3/4] move back out of src --- {src/eessi => eessi}/__init__.py | 0 {src/eessi => eessi}/testsuite/__init__.py | 0 {src/eessi => eessi}/testsuite/common_config.py | 0 {src/eessi => eessi}/testsuite/constants.py | 0 {src/eessi => eessi}/testsuite/hooks.py | 0 {src/eessi => eessi}/testsuite/tests/__init__.py | 0 {src/eessi => eessi}/testsuite/tests/apps/__init__.py | 0 {src/eessi => eessi}/testsuite/tests/apps/gromacs.py | 0 .../testsuite/tests/apps/tensorflow/__init__.py | 0 .../testsuite/tests/apps/tensorflow/src/__init__.py | 0 .../testsuite/tests/apps/tensorflow/src/mnist_setup.py | 0 .../testsuite/tests/apps/tensorflow/src/tf_test.py | 0 .../testsuite/tests/apps/tensorflow/tensorflow.py | 0 {src/eessi => eessi}/testsuite/utils.py | 0 pyproject.toml | 1 - setup.cfg | 3 --- 16 files changed, 4 deletions(-) rename {src/eessi => eessi}/__init__.py (100%) rename {src/eessi => eessi}/testsuite/__init__.py (100%) rename {src/eessi => eessi}/testsuite/common_config.py (100%) rename {src/eessi => eessi}/testsuite/constants.py (100%) rename {src/eessi => eessi}/testsuite/hooks.py (100%) rename {src/eessi => eessi}/testsuite/tests/__init__.py (100%) rename {src/eessi => eessi}/testsuite/tests/apps/__init__.py (100%) rename {src/eessi => eessi}/testsuite/tests/apps/gromacs.py (100%) rename {src/eessi => eessi}/testsuite/tests/apps/tensorflow/__init__.py (100%) rename {src/eessi => eessi}/testsuite/tests/apps/tensorflow/src/__init__.py (100%) rename {src/eessi => eessi}/testsuite/tests/apps/tensorflow/src/mnist_setup.py (100%) rename {src/eessi => eessi}/testsuite/tests/apps/tensorflow/src/tf_test.py (100%) rename {src/eessi => eessi}/testsuite/tests/apps/tensorflow/tensorflow.py (100%) rename {src/eessi => eessi}/testsuite/utils.py (100%) diff --git a/src/eessi/__init__.py b/eessi/__init__.py similarity index 100% rename from src/eessi/__init__.py rename to eessi/__init__.py diff --git a/src/eessi/testsuite/__init__.py b/eessi/testsuite/__init__.py similarity index 100% rename from src/eessi/testsuite/__init__.py rename to eessi/testsuite/__init__.py diff --git a/src/eessi/testsuite/common_config.py b/eessi/testsuite/common_config.py similarity index 100% rename from src/eessi/testsuite/common_config.py rename to eessi/testsuite/common_config.py diff --git a/src/eessi/testsuite/constants.py b/eessi/testsuite/constants.py similarity index 100% rename from src/eessi/testsuite/constants.py rename to eessi/testsuite/constants.py diff --git a/src/eessi/testsuite/hooks.py b/eessi/testsuite/hooks.py similarity index 100% rename from src/eessi/testsuite/hooks.py rename to eessi/testsuite/hooks.py diff --git a/src/eessi/testsuite/tests/__init__.py b/eessi/testsuite/tests/__init__.py similarity index 100% rename from src/eessi/testsuite/tests/__init__.py rename to eessi/testsuite/tests/__init__.py diff --git a/src/eessi/testsuite/tests/apps/__init__.py b/eessi/testsuite/tests/apps/__init__.py similarity index 100% rename from src/eessi/testsuite/tests/apps/__init__.py rename to eessi/testsuite/tests/apps/__init__.py diff --git a/src/eessi/testsuite/tests/apps/gromacs.py b/eessi/testsuite/tests/apps/gromacs.py similarity index 100% rename from src/eessi/testsuite/tests/apps/gromacs.py rename to eessi/testsuite/tests/apps/gromacs.py diff --git a/src/eessi/testsuite/tests/apps/tensorflow/__init__.py b/eessi/testsuite/tests/apps/tensorflow/__init__.py similarity index 100% rename from src/eessi/testsuite/tests/apps/tensorflow/__init__.py rename to eessi/testsuite/tests/apps/tensorflow/__init__.py diff --git a/src/eessi/testsuite/tests/apps/tensorflow/src/__init__.py b/eessi/testsuite/tests/apps/tensorflow/src/__init__.py similarity index 100% rename from src/eessi/testsuite/tests/apps/tensorflow/src/__init__.py rename to eessi/testsuite/tests/apps/tensorflow/src/__init__.py diff --git a/src/eessi/testsuite/tests/apps/tensorflow/src/mnist_setup.py b/eessi/testsuite/tests/apps/tensorflow/src/mnist_setup.py similarity index 100% rename from src/eessi/testsuite/tests/apps/tensorflow/src/mnist_setup.py rename to eessi/testsuite/tests/apps/tensorflow/src/mnist_setup.py diff --git a/src/eessi/testsuite/tests/apps/tensorflow/src/tf_test.py b/eessi/testsuite/tests/apps/tensorflow/src/tf_test.py similarity index 100% rename from src/eessi/testsuite/tests/apps/tensorflow/src/tf_test.py rename to eessi/testsuite/tests/apps/tensorflow/src/tf_test.py diff --git a/src/eessi/testsuite/tests/apps/tensorflow/tensorflow.py b/eessi/testsuite/tests/apps/tensorflow/tensorflow.py similarity index 100% rename from src/eessi/testsuite/tests/apps/tensorflow/tensorflow.py rename to eessi/testsuite/tests/apps/tensorflow/tensorflow.py diff --git a/src/eessi/testsuite/utils.py b/eessi/testsuite/utils.py similarity index 100% rename from src/eessi/testsuite/utils.py rename to eessi/testsuite/utils.py diff --git a/pyproject.toml b/pyproject.toml index c9b42b0a..7ffffe55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,5 +18,4 @@ requires-python = ">=3.6" "Bug Tracker" = "https://github.com/EESSI/test-suite/issues" [tool.setuptools.packages.find] -where = ["src"] include = ["eessi*"] diff --git a/setup.cfg b/setup.cfg index ecc8d491..737b6e84 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,11 +13,8 @@ project_urls = install_requires = setuptools python_requires = >=3.6 -package_dir = - =src packages = find: namespace_packages = eessi [options.packages.find] -where = src include = eessi* From 44563d584fcee445536fc697a6295452eed62441 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Thu, 21 Sep 2023 08:52:45 +0200 Subject: [PATCH 4/4] add fixed pip_install gh action --- .github/workflows/pip_install.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pip_install.yml b/.github/workflows/pip_install.yml index 84ad340a..1847574d 100644 --- a/.github/workflows/pip_install.yml +++ b/.github/workflows/pip_install.yml @@ -4,20 +4,33 @@ on: [push, pull_request, workflow_dispatch] permissions: read-all jobs: test_pip_install: - runs-on: ubuntu-22.04 + # ubuntu <= 20.04 is required for python 3.6 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: - python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] steps: - name: Check out software-layer repository uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 with: persist-credentials: false + - name: Set up Python + uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install setuptools + run: | + if [[ "${{ matrix.python-version }}" == "3.6" ]]; then + # system installed setuptools version in RHEL8 and CO7 + python -m pip install --user setuptools==39.2.0 + fi + - name: Install ReFrame run: | - pip install --user ReFrame-HPC + python -m pip install --user ReFrame-HPC - name: Install EESSI test suite with 'pip install' run: | @@ -26,8 +39,15 @@ jobs: python setup.py sdist ls dist - pip install --user dist/eessi*.tar.gz + python -m pip install --user dist/eessi*.tar.gz find $HOME/.local + # make sure we are not in the source directory + cd $HOME + + python --version + python -m pip --version + python -c 'import setuptools; print("setuptools", setuptools.__version__)' + python -c 'import eessi.testsuite.utils' python -c 'import eessi.testsuite.tests.apps'