From 0f5b12bf352fff0a8023c3f3e07030232eb41cba Mon Sep 17 00:00:00 2001 From: Ayala Shachar Date: Wed, 1 Oct 2025 13:36:11 +0300 Subject: [PATCH 1/5] Use hatchlig for build-backend --- pyproject.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 604ec4e..d97be0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] -build-backend = "setuptools.build_meta" +requires = ["hatchling>=0.25.1", "hatch-vcs"] +build-backend = "hatchling.build" [project] name = "vintage" @@ -37,3 +37,6 @@ doc = [ "alabaster", "releases", ] + +[tool.hatch.version] +source = "vcs" From 2eed25771b0f6a41de99fe4c366e56725d9cc90d Mon Sep 17 00:00:00 2001 From: Ayala Shachar Date: Wed, 1 Oct 2025 13:37:14 +0300 Subject: [PATCH 2/5] Format pyproject.toml --- pyproject.toml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d97be0a..4d42f60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,23 +20,14 @@ classifiers = [ dependencies = [] dynamic = ["version"] -authors = [ - { name = "Rotem Yaari", email = "vmalloc@gmail.com" }, -] +authors = [{ name = "Rotem Yaari", email = "vmalloc@gmail.com" }] [project.urls] "Homepage" = "https://github.com/getslash/vintag" [project.optional-dependencies] -testing = [ - "pytest>=2.9", - "pylint>=1.7.2", -] -doc = [ - "Sphinx", - "alabaster", - "releases", -] +testing = ["pytest>=2.9", "pylint>=1.7.2"] +doc = ["Sphinx", "alabaster", "releases"] [tool.hatch.version] source = "vcs" From cebb1626825b27fe397809017875250ccfffb574 Mon Sep 17 00:00:00 2001 From: Ayala Shachar Date: Wed, 1 Oct 2025 13:37:36 +0300 Subject: [PATCH 3/5] Fix URL of project homepage --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d42f60..e554ad3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ dynamic = ["version"] authors = [{ name = "Rotem Yaari", email = "vmalloc@gmail.com" }] [project.urls] -"Homepage" = "https://github.com/getslash/vintag" +"Homepage" = "https://github.com/getslash/vintage" [project.optional-dependencies] testing = ["pytest>=2.9", "pylint>=1.7.2"] From c99f20381a5c4dea5aa1ab98b7250f9b3160ec53 Mon Sep 17 00:00:00 2001 From: Ayala Shachar Date: Wed, 1 Oct 2025 13:39:17 +0300 Subject: [PATCH 4/5] CI: Add docs & publish jobs --- .github/workflows/main.yml | 48 +++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d634cbf..3866aa1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ on: # manually triggered jobs: - build: + test: runs-on: ubuntu-latest strategy: matrix: @@ -25,8 +25,54 @@ jobs: 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: | uv venv uv pip install ".[testing]" .venv/bin/pytest tests + + docs: + runs-on: ubuntu-latest + steps: + - 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: Building docs + run: | + uv venv --python 3.11 + uv pip install ".[doc]" + .venv/bin/sphinx-build -a -W -E doc build/sphinx/html + + publish: + if: startsWith(github.ref, 'refs/tags/') + needs: test + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install hatch + run: pip install hatch + + - name: Build package + run: hatch build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + attestations: true + skip-existing: true From 58cf1380bc871aade0870d43328aaec87e454dd3 Mon Sep 17 00:00:00 2001 From: Ayala Shachar Date: Wed, 1 Oct 2025 13:42:54 +0300 Subject: [PATCH 5/5] Update changelog --- doc/changelog.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 2d43185..7c9d79d 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,13 +1,11 @@ Changelog ========= -* :feature:`-` Support python versions: >= 3.8, <= 3.13 +* :feature:`-` Use hatchlig as build-backend * :feature:`-` Use UV in CI * :feature:`-` Use `pyproject.toml` from package configuration * :feature:`-` Move CI to GitHub Actions (from Travis CI) -* :feature:`-` Support python version 3.8, 3.9, 3.10, 3.11 -* :feature:`-` Drop support for python versions: 2.7, 3.4, 3.5, 3.6 -* :feature:`-` Support python 3.12 +* :feature:`-` Support python versions >= 3.8 (drop support for older versions) * :release:`0.4.1 <07-05-2018>` * :bug:`-` Set releases version to 3.6 only * :release:`0.4.0 <28-06-2017>`