diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7646ee5..d56e20a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.8", "3.12"] + python: ["3.10", "3.12"] steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29b61f1..a18dd9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.12"] + python-version: ["3.10", "3.12"] runs-on: [ubuntu-latest, macos-latest, windows-latest] include: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e8bf805..f801f92 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,14 +40,14 @@ repos: args: [--prose-wrap=always] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.14.3" + rev: "v0.14.4" hooks: - id: ruff args: ["--fix", "--show-fixes"] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-clang-format - rev: "v21.1.2" + rev: "v21.1.5" hooks: - id: clang-format types_or: [c++, c, cuda] diff --git a/pyproject.toml b/pyproject.toml index b06c847..ac2290e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ description = "This project provides the infrastructure to build s5cmd Python wheels." readme = "README.md" license.file = "LICENSE" -requires-python = ">=3.8" +requires-python = ">=3.10" classifiers = [ "Development Status :: 1 - Planning", "Intended Audience :: Science/Research", @@ -21,8 +21,6 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -104,7 +102,7 @@ report.exclude_also = [ [tool.mypy] files = ["src", "tests"] -python_version = "3.8" +python_version = "3.10" warn_unused_configs = true strict = true enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] @@ -163,7 +161,7 @@ isort.required-imports = ["from __future__ import annotations"] [tool.pylint] -py-version = "3.8" +py-version = "3.10" ignore-paths = [".*/_version.py"] extension-pkg-allow-list = [] reports.output-format = "colorized" diff --git a/tests/test_executable.py b/tests/test_executable.py index e2ea840..0497e36 100644 --- a/tests/test_executable.py +++ b/tests/test_executable.py @@ -1,17 +1,11 @@ from __future__ import annotations import subprocess -import sys import sysconfig from pathlib import Path import pytest -if sys.version_info < (3, 10): - from importlib_metadata import distribution -else: - from importlib.metadata import distribution - import s5cmd from . import push_argv @@ -33,16 +27,22 @@ def test_module(tool): def _get_scripts(): - dist = distribution("s5cmd") + # Collect all "scripts" directories from sysconfig schemes scripts_paths = [ Path(sysconfig.get_path("scripts", scheme)).resolve() for scheme in sysconfig.get_scheme_names() ] scripts = [] - for file in dist.files: - if file.locate().parent.resolve(strict=True) in scripts_paths: - scripts.append(file.locate().resolve(strict=True)) - return scripts + for scripts_dir in scripts_paths: + # Skip non-existent dirs to avoid Resolve errors + if not scripts_dir.exists(): + continue + # Add regular files in the scripts dir (resolve to absolute Path) + for f in scripts_dir.iterdir(): + if f.is_file(): + scripts.append(f.resolve()) + # remove duplicates while preserving order + return list(dict.fromkeys(scripts)) @all_tools