From f5076112a14b50fc7baf943323ee8fc91fbbe0f4 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Sun, 6 Sep 2026 01:52:06 +0200 Subject: [PATCH] chore: prepare package publishing metadata - Add Gitea workflow for tagged package releases. - Move package metadata into pyproject.toml. - Bump the package version to 3.0.2. - Define optional extras for dotenv, MongoDB, Redis, and Trio Redis. - Keep setup.py as a minimal setuptools entry point. - Disable universal wheel output for Python 3 only builds. --- .gitea/workflows/publish.yml | 28 ++++++++++++++++++ CHANGELOG.md | 6 ++++ pyproject.toml | 43 +++++++++++++++++++++++++-- setup.cfg | 4 +-- setup.py | 56 +----------------------------------- 5 files changed, 77 insertions(+), 60 deletions(-) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..8d1ce8e --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,28 @@ +name: Build & Publish Package + +on: + push: + tags: + - "v*.*.*" + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + - name: Build package + run: uv build + + - name: Publish to Gitea + run: | + uv publish \ + --publish-url "${{ vars.REGISTRY_URL }}/api/packages/${{ github.repository_owner }}/pypi" \ + --username "${{ github.repository_owner }}" \ + --password "${{ secrets.ACTION_ACCESS_TOKEN }}" diff --git a/CHANGELOG.md b/CHANGELOG.md index c4d6f3c..f202cef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### 3.0.2 + +- Add package metadata for Gitea PyPI registry publishing. +- Add Gitea workflow for tagged package releases. +- Add explicit redis-trio extra for the bundled Trio Redis client. + ### 2.1.0 - `session_cookie_name` fix diff --git a/pyproject.toml b/pyproject.toml index 8ff0fb2..371e1f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,44 @@ [project] name = "quart-session" -version = "3.0.1" -description = "Add your description here" +version = "3.0.2" +description = "Server-side sessions for Quart" readme = "README.md" requires-python = ">=3.13" -dependencies = [] +license = "BSD-3-Clause" +license-files = ["LICENSE"] +authors = [{ name = "Kroket Ltd.", email = "code@kroket.io" }] +dependencies = [ + "Quart>=0.19.0", +] +classifiers = [ + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.13", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules", +] + +[project.urls] +Homepage = "https://git.yiprawr.dev/daniel156161/quart-session" +Repository = "https://git.yiprawr.dev/daniel156161/quart-session" +Issues = "https://git.yiprawr.dev/daniel156161/quart-session/issues" + +[project.optional-dependencies] +dotenv = ["python-dotenv"] +mongodb = ["motor>=2.5.1"] +redis = ["redis>=4.4.0"] +redis-trio = ["trio>=0.22"] + +[dependency-groups] +dev = [ + "build>=1.3.0", +] + +[build-system] +requires = ["setuptools>=80", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.setuptools.packages.find] +include = ["quart_session*"] diff --git a/setup.cfg b/setup.cfg index 5e40900..526aeb2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ -[wheel] -universal = 1 +[bdist_wheel] +universal = 0 diff --git a/setup.py b/setup.py index a80f430..6068493 100644 --- a/setup.py +++ b/setup.py @@ -1,57 +1,3 @@ -""" -Quart-Session -------------- - -Quart-Session is an extension for Quart that adds support for -Server-side Session to your application. - -Links -````` - -* `Github - `_ - -""" from setuptools import setup -with open('README.md') as f: - long_description = f.read() - - -INSTALL_REQUIRES = [ - "Quart>=0.19.0" -] - -setup( - name='Quart-Session', - version='3.0.1', - url='https://github.com/kroketio/quart-session', - license='BSD', - author='Kroket Ltd.', - author_email='code@kroket.io', - description='Adds server-side session support to your Quart application', - long_description=long_description, - long_description_content_type='text/markdown', - packages=['quart_session'], - zip_safe=False, - include_package_data=True, - platforms='any', - install_requires=INSTALL_REQUIRES, - tests_require=INSTALL_REQUIRES + ["asynctest", "hypothesis", "pytest", "pytest-asyncio"], - extras_require={ - "dotenv": ["python-dotenv"], - "mongodb": ["motor>=2.5.1"], - "redis": ["redis>=4.4.0"] - }, - classifiers=[ - 'Environment :: Web Environment', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Software Development :: Libraries :: Python Modules' - ] -) +setup()