Skip to content

Commit

Permalink
Use UV & support python >= 3.8, <= 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
ayalash committed Oct 5, 2024
1 parent 96c7e2f commit 8e67466
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
env:
UV_PYTHON: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@v3
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Tests
run: |
python -m venv .env
.env/bin/pip install -U setuptools pip
.env/bin/pip install '.[testing]'
.env/bin/pytest tests
uv venv
uv pip install ".[testing]"
.venv/bin/pytest tests
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
default: test

test: env
.env/bin/pytest

env: .env/.up-to-date

.env/.up-to-date: Makefile pyproject.toml
python -m venv .env
.env/bin/pip install -U setuptools pip
.env/bin/pip install -e '.[testing]'
touch .env/.up-to-date
.venv/bin/pytest

env:
uv venv
uv pip install -e ".[testing]"
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ build-backend = "setuptools.build_meta"
name = "emport"
description = "Utility library for performing programmatic imports"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = { text = "BSD 3-Clause License" }

classifiers = [
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"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",
"Programming Language :: Python :: 3.13",
]
dependencies = [
'Logbook>=0.11.0',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37,py38,py39,py310
envlist = py38,py39,py310,py311,py312,py313

[testenv]
extras =
Expand Down

0 comments on commit 8e67466

Please sign in to comment.