Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove python 3.8 dependency from buildtest #1829

Merged
merged 4 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cli_tutorial_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.8
python-version: 3.9

- name: Buildtest CLI Check
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, macos-13, ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

matrix:
os: [macos-latest, macos-13, ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
python-version: 3.8
python-version: 3.9

- name: Check imports with pyflakes
run: |
Expand Down
4 changes: 2 additions & 2 deletions bin/buildtest
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ prefix=os.path.dirname(os.path.dirname(buildtest_file))

sys.path.insert(0, prefix)

if sys.version_info[:3] < (3, 8, 0):
sys.exit("buildtest requires Python 3.8.0 or higher.")
if sys.version_info[:3] < (3, 9, 0):
sys.exit("buildtest requires Python 3.9.0 or higher.")

from buildtest.main import main

Expand Down
10 changes: 5 additions & 5 deletions docs/installing_buildtest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Requirements
You need the following packages to install buildtest.

- `git <https://git-scm.com/downloads>`_
- `Python <https://www.python.org/downloads/>`_ >= 3.8
- `Python <https://www.python.org/downloads/>`_ >= 3.9

Cloning buildtest
------------------
Expand Down Expand Up @@ -37,7 +37,7 @@ If you prefer the latest release, you can clone the **master** branch::
Installing buildtest
-----------------------

buildtest requires a python 3.8 or higher, we recommend you setup a python environment in order
buildtest requires a Python 3.9 or higher, we recommend you setup a python environment in order
to install buildtest. You can use `venv <https://docs.python.org/3/library/venv.html>`_, `conda <https://conda.io/>`_,
or `pipenv <https://pipenv.readthedocs.io/en/latest/>`_ to manage your python environment depending on your preference.
Assuming you have cloned buildtest in your HOME directory you will need to follow these instructions to install buildtest.
Expand Down Expand Up @@ -66,15 +66,15 @@ Assuming you have cloned buildtest in your HOME directory you will need to follo

.. code-block:: console

conda create -n buildtest python=3.8
conda create -n buildtest python=3.9
source activate buildtest
source $HOME/buildtest/setup.sh

.. tab-item:: pipenv

.. code-block:: console

pipenv --python 3.8
pipenv --python 3.9
pipenv shell
source $HOME/buildtest/setup.sh

Expand All @@ -92,7 +92,7 @@ Specify Python Wrapper via BUILDTEST_PYTHON
The `buildtest <https://github.com/buildtesters/buildtest/blob/devel/bin/buildtest>`_ program will search for
a python wrapper (`python`, `python3`) to run buildtest, however you can specify an alternate python wrapper by
setting environment variable ``BUILDTEST_PYTHON`` wrapper. This variable will be set during execution of buildtest,
please note the python wrapper must be 3.8 or higher in-order for buildtest to function properly.
please note the python wrapper must be 3.9 or higher in-order for buildtest to function properly.

Development Dependencies (Optional)
------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "buildtest"
dynamic = ["version"]
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = "MIT"
authors = [
{ name = "Shahzeb Siddiqui", email = "[email protected]" },
Expand Down Expand Up @@ -84,7 +84,8 @@ testpaths = ["tests"]
markers = [
"schema: run schema tests",
"utility: run test for utility methods used throughout codebase",
"cli: run test for targetting buildtest command line features"
"cli: run test for targetting buildtest command line features",
"spack: run spack tests"
]

[tool.coverage.run]
Expand Down
2 changes: 1 addition & 1 deletion tests/buildsystem/test_spack.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def test_spack_examples():
# spack builds must run in container ghcr.io/buildtesters/buildtest_spack:latest which comes with username 'spack' and home directory '/home/spack'
# if not (getpass.getuser() == "spack" and os.path.expanduser("~") == "/home/spack"):
if not (getpass.getuser() in ["root", "spack"] and shutil.which("spack")):
if not (getpass.getuser() in ["root", "spack", "runner"] and shutil.which("spack")):
pytest.skip(
"Unable to run this test requires docker container: ghcr.io/buildtesters/buildtest_spack:spack-sc23"
)
Expand Down
Loading