Skip to content

Commit 52d68f9

Browse files
author
Daniele Briggi
committed
chore(workflow): change build flow
1 parent 55a37f2 commit 52d68f9

File tree

4 files changed

+16
-34
lines changed

4 files changed

+16
-34
lines changed

.github/workflows/pypi-package.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ jobs:
1515
runs-on: ubuntu-latest
1616
permissions:
1717
id-token: write # mandatory for Pypi trusted publishing
18+
contents: read
1819
defaults:
1920
run:
2021
shell: bash
2122
steps:
2223
- uses: actions/checkout@v4
23-
with:
24-
submodules: false
2524

2625
- name: Set up Python
2726
uses: actions/setup-python@v5
@@ -43,10 +42,10 @@ jobs:
4342
echo "version=$VERSION" >> $GITHUB_OUTPUT
4443
4544
- name: Build
45+
env:
46+
VERSION: ${{ steps.get_version.outputs.version }}
4647
run: |
47-
# Update version in pyproject.toml
48-
sed -i 's/^version = ".*"/version = "${{ steps.get_version.outputs.version }}"/' pyproject.toml
49-
python setup.py bdist_wheel
48+
python -m build --wheel
5049
5150
- name: Publish to PyPI
5251
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["setuptools>=61.0", "wheel", "toml"]
2+
requires = ["setuptools>=61.0", "build", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "sqlite-rag"
7-
version = "0.0.0"
7+
dynamic = ["version"]
88
description = "Hybird search with SQLite AI and SQLite Vector"
99
authors = [{name = "SQLite AI Team"}]
1010
requires-python = ">=3.10"
@@ -13,6 +13,7 @@ classifiers = [
1313
"Programming Language :: Python :: 3.10",
1414
"Programming Language :: Python :: 3.11",
1515
"Programming Language :: Python :: 3.12",
16+
"Programming Language :: Python :: 3.13",
1617
"Operating System :: OS Independent",
1718
]
1819
dependencies = [
@@ -26,7 +27,6 @@ dependencies = [
2627

2728
[project.optional-dependencies]
2829
dev = [
29-
"toml",
3030
"pytest",
3131
"pytest-cov",
3232
"black",
@@ -36,7 +36,9 @@ dev = [
3636
"pre-commit",
3737
"pyarrow",
3838
"pandas",
39-
"psutil"
39+
"psutil",
40+
"twine",
41+
"build"
4042
]
4143

4244
[project.urls]
@@ -51,6 +53,9 @@ sqlite-rag = "sqlite_rag.cli:cli"
5153
where = ["src"]
5254
include = ["sqlite_rag*"]
5355

56+
[tool.setuptools.dynamic]
57+
version = {attr = "sqlite_rag._version.__version__"}
58+
5459
[tool.isort]
5560
# make the tools compatible to each other
5661
profile = "black"

setup.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/sqlite_rag/_version.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import os
2+
3+
__version__ = os.environ.get("VERSION", "0.0.0")

0 commit comments

Comments
 (0)