Skip to content

Commit ef7b253

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

File tree

4 files changed

+14
-34
lines changed

4 files changed

+14
-34
lines changed

.github/workflows/pypi-package.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
shell: bash
2121
steps:
2222
- uses: actions/checkout@v4
23-
with:
24-
submodules: false
2523

2624
- name: Set up Python
2725
uses: actions/setup-python@v5
@@ -43,10 +41,10 @@ jobs:
4341
echo "version=$VERSION" >> $GITHUB_OUTPUT
4442
4543
- name: Build
44+
env:
45+
VERSION: ${{ steps.get_version.outputs.version }}
4646
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
47+
python -m build --wheel
5048
5149
- name: Publish to PyPI
5250
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 8 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", "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,8 @@ dev = [
3636
"pre-commit",
3737
"pyarrow",
3838
"pandas",
39-
"psutil"
39+
"psutil",
40+
"twine",
4041
]
4142

4243
[project.urls]
@@ -51,6 +52,9 @@ sqlite-rag = "sqlite_rag.cli:cli"
5152
where = ["src"]
5253
include = ["sqlite_rag*"]
5354

55+
[tool.setuptools.dynamic]
56+
version = {attr = "sqlite_rag._version.__version__"}
57+
5458
[tool.isort]
5559
# make the tools compatible to each other
5660
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)