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
35 changes: 33 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- 'docs/**'
branches:
- main
tags:
- 'v*.*'
pull_request:
branches:
- main
Expand All @@ -22,11 +24,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -45,3 +47,32 @@ jobs:
- name: Report coverage
run: |
make coveralls

release:
needs: test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/rolo
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Build release
run: make dist

- name: List artifacts
run: ls -lah dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@ venv.bak/

# sqlite database files created by examples
*.db

# Hatch VCS hook generates this file during build
rolo/version.py
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ venv: $(VENV_ACTIVATE)

$(VENV_ACTIVATE): pyproject.toml
test -d .venv || $(VENV_BIN) .venv
$(VENV_RUN); pip install --upgrade pip setuptools wheel
$(VENV_RUN); pip install --upgrade pip
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick question: were were publishing wheels before? and would we stop? feels like we were not

Copy link
Copy Markdown
Member Author

@thrau thrau Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we were indeed publishing wheels (example: https://pypi.org/project/rolo/#rolo-0.8.1-py3-none-any.whl)

we are still publishing them, but now they are built by hatchling, so setuptools and wheel are no longer needed.

$(VENV_RUN); pip install -e .[dev]
touch $(VENV_DIR)/bin/activate

Expand Down
22 changes: 7 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "rolo"
authors = [
{ name = "LocalStack Contributors", email = "info@localstack.cloud" }
]
version = "0.8.0"
description = "A Python framework for building HTTP-based server applications"
dependencies = [
"requests>=2.20",
Expand All @@ -26,7 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries"
]
dynamic = ["readme"]
dynamic = ["readme", "version"]


[project.optional-dependencies]
Expand All @@ -48,18 +47,11 @@ docs = [
"myst_parser",
]

[tool.setuptools]
include-package-data = false
[tool.hatch.version]
source = "vcs"

[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}

[tool.setuptools.packages.find]
include = ["rolo*"]
exclude = ["tests*"]

[tool.setuptools.package-data]
"*" = ["*.md"]
[tool.hatch.build.hooks.vcs]
version-file = "rolo/version.py"

[tool.black]
line_length = 100
Expand Down
2 changes: 2 additions & 0 deletions rolo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .response import Response
from .routing.resource import Resource, resource
from .routing.router import Router, route
from .version import __version__

__all__ = [
"route",
Expand All @@ -10,4 +11,5 @@
"Router",
"Response",
"Request",
"__version__",
]
Loading