Skip to content
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
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- run: sudo apt install gettext -y
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- run: sudo apt install gettext -y
- run: python -m pip install .[test]
- run: python -m pytest
- run: uv run --no-dev --group=test pytest
- uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,6 @@ cython_debug/

# flit-scm
_version.py

# UV
uv.lock
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,25 @@ classifiers = [
]
requires-python = ">=3.10"
dependencies = [
"flit-core~=3.5",
"flit-core~=3.12",
]

[project.optional-dependencies]
scm = [
"flit-scm",
]

[dependency-groups]
dev = [
{ include-group = "test" },
]
test = [
"pytest",
"pytest-cov",
"flit-scm",
"build",
"wheel",
]
scm = [
"flit-scm",
"pip",
]

[project.urls]
Expand Down
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import pytest

PACKAGE_DIR = Path(__file__).parent.parent


@pytest.fixture
def package():
Expand All @@ -17,7 +19,7 @@ def package():
'version = "0.1.0"\n'
'description = "A package"\n'
"[build-system]\n"
'requires = ["flit_core >=3.0.0,<4"]\n'
f'requires = ["flit_core >=3.0.0,<4", "{PACKAGE_DIR}"]\n'
'build-backend = "flit_gettext.core"\n'
)
(temp_dir / "package").mkdir(parents=True)
Expand All @@ -38,7 +40,7 @@ def package_scm():
'description = "A package"\n'
'dynamic = ["version"]\n'
"[build-system]\n"
'requires = ["flit_core >=3.0.0,<4", "flit_scm"]\n'
f'requires = ["flit_core >=3.0.0,<4", "flit_scm", "{PACKAGE_DIR}"]\n'
'build-backend = "flit_gettext.scm"\n'
"[tool.setuptools_scm]\n"
'write_to = "package/_version.py"\n'
Expand Down
Loading