Skip to content

Commit

Permalink
chore: drop Python 3.7 & use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans authored Oct 10, 2024
1 parent f351ae4 commit 8f23bd4
Show file tree
Hide file tree
Showing 6 changed files with 1,026 additions and 40 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,31 @@ jobs:
3.10
3.11
3.13
pypy3.7
pypy3.8
pypy3.9
pypy3.10
3.12
check-latest: true
allow-prereleases: true
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.7 pypy3.8 pypy3.9 pypy3.10'
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10'
sccache: "true"
manylinux: auto
- uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}
path: dist
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: pytest
if: ${{ !startsWith(github.ref, 'refs/tags/') && matrix.target == 'x86_64-unknown-linux-gnu' }}
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install --force-reinstall --find-links ../dist --disable-pip-version-check pyromark
pip install -U --disable-pip-version-check -r ../requirements-tests.txt
pytest
uv sync --no-install-project --frozen
uv pip install --find-links ../dist --no-index pyromark
uv run --no-sync pytest
working-directory: ./tests
windows:
runs-on: windows-latest
Expand All @@ -100,7 +99,6 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: |
3.7
3.8
3.9
3.10
Expand All @@ -109,26 +107,26 @@ jobs:
3.12
architecture: ${{ matrix.architecture }}
check-latest: true
allow-prereleases: true
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12 3.13'
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13'
sccache: "true"
- uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.target }}
path: dist
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: pytest
if: ${{ !startsWith(github.ref, 'refs/tags/') && matrix.target == 'x86_64-pc-windows-msvc' }}
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/Scripts/activate
pip install --force-reinstall --find-links ../dist --disable-pip-version-check pyromark
pip install -U --disable-pip-version-check -r ../requirements-tests.txt
pytest
uv sync --no-install-project --frozen
uv pip install --find-links ../dist --no-index pyromark
uv run --no-sync pytest
working-directory: ./tests
macos:
runs-on: ${{ matrix.runner }}
Expand All @@ -145,42 +143,44 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: |
${{ matrix.target == 'x86_64-apple-darwin' && '3.7' || '' }}
3.8
3.9
3.10
3.11
3.13
${{ matrix.target == 'x86_64-apple-darwin' && 'pypy3.7' || '' }}
pypy3.8
pypy3.9
pypy3.10
3.12
check-latest: true
allow-prereleases: true
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.7 pypy3.8 pypy3.9 pypy3.10'
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10'
sccache: "true"
- uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.target }}
path: dist
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: pytest
if: ${{ !startsWith(github.ref, 'refs/tags/') && matrix.target == 'x86_64-apple-darwin' }}
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install --force-reinstall --find-links ../dist --disable-pip-version-check pyromark
pip install -U --disable-pip-version-check -r ../requirements-tests.txt
pytest
uv sync --no-install-project --frozen
uv pip install --find-links ../dist --no-index pyromark
uv run --no-sync pytest
working-directory: ./tests
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
check-latest: true
- uses: PyO3/maturin-action@v1
with:
command: sdist
Expand Down
13 changes: 5 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ version: 2
build:
os: ubuntu-lts-latest
tools:
python: "3.12"
rust: latest
python:
install:
- requirements: requirements-docs.txt
- method: pip
path: .
mkdocs:
configuration: mkdocs.yml
commands:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv run --frozen --no-cache --python 3.12 mkdocs build -d $READTHEDOCS_OUTPUT/html
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Blazingly fast Markdown parser"
readme = "README.md"
keywords = ["converter", "html"]
authors = [{ name = "monosans", email = "[email protected]" }]
requires-python = ">=3.7"
requires-python = ">=3.8"
classifiers = [
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
Expand All @@ -17,7 +17,6 @@ classifiers = [
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -36,3 +35,12 @@ scripts.pyromark = "pyromark.__main__:main"
[tool.maturin]
python-source = "python"
module-name = "pyromark._pyromark"

[tool.uv]
dev-dependencies = [
"mkdocs-material==9.5.39",
"mkdocs-minify-html-plugin==0.2.3",
"mkdocstrings==0.26.1",
"mkdocstrings-python==1.11.1",
"pytest==8.3.3",
]
4 changes: 0 additions & 4 deletions requirements-docs.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements-tests.txt

This file was deleted.

Loading

0 comments on commit 8f23bd4

Please sign in to comment.