Skip to content

Commit

Permalink
require Python >= 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Sep 6, 2023
1 parent b2039e0 commit 750dd81
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ classifiers = [
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Atmospheric Science"
]
requires-python = ">=3.7"
requires-python = ">=3.8"
dynamic = ["version", "readme"]
dependencies = ["python-dateutil", "numpy", "xarray>=0.16.0", "scipy", "h5py", "matplotlib >= 3.1"]

Expand Down
9 changes: 2 additions & 7 deletions src/gemini3d/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ def executable(name: str, root: Path | None = None) -> Path:
if pexe.is_file():
return wsl.win_path2wsl_path(pexe) # type: ignore
else:
exe = shutil.which(name, path=str(p / n))
logging.debug(f"{name} {p / n} => {exe}")
if exe:
if exe := shutil.which(name, path=p / n):
return Path(exe)

raise FileNotFoundError(f"{name} not found")
raise FileNotFoundError(f"{name} not found, search paths: {paths}")


def gemini_exe(name: str = "gemini3d.run", root: Path | None = None) -> Path:
Expand All @@ -85,9 +83,6 @@ def gemini_exe(name: str = "gemini3d.run", root: Path | None = None) -> Path:

exe = executable(name, root)

if not exe:
raise FileNotFoundError(f"Gemini3D executable {name} not found")

# %% ensure Gemini3D executable is runnable
if os.name == "nt" and isinstance(exe, PurePosixPath):
cmd0 = ["wsl", str(exe)]
Expand Down
2 changes: 0 additions & 2 deletions src/gemini3d/tests/intg/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import pytest
import os
import re
import sys

import matplotlib as mpl

import gemini3d.web
import gemini3d.plot


@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires Python >= 3.8")
@pytest.mark.parametrize(
"name",
[
Expand Down

0 comments on commit 750dd81

Please sign in to comment.