Skip to content

Commit 55c9622

Browse files
committed
Migrate to pyproject.toml with setuptools_scm for tag-based versioning and python -m build
1 parent 0bcbe40 commit 55c9622

6 files changed

Lines changed: 22 additions & 14 deletions

File tree

.github/workflows/build-wheel.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
1416
- name: Set up Python
1517
uses: actions/setup-python@v6
1618
with:
@@ -29,8 +31,8 @@ jobs:
2931
- name: Build wheel
3032
run: |
3133
python -m pip install --upgrade pip
32-
pip install setuptools wheel
33-
python setup.py bdist_wheel --universal
34+
pip install build
35+
python -m build
3436
3537
- name: Upload Wheel Artifact
3638
uses: actions/upload-artifact@v6

.github/workflows/publish-pypi.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
1416
- name: Set up Python
1517
uses: actions/setup-python@v6
1618
with:
1719
python-version: '3.9'
18-
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install setuptools wheel
2220

23-
- name: Build wheel
21+
- name: Build distributions
2422
run: |
2523
python -m pip install --upgrade pip
26-
pip install wheel
27-
python setup.py bdist_wheel --universal
24+
pip install build
25+
python -m build
2826
2927
- name: Upload Artifacts
3028
uses: actions/upload-artifact@v6

.github/workflows/publish-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
steps:
1212
- name: Checkout code
1313
uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
1416

1517
- name: Set up Python
1618
uses: actions/setup-python@v6
@@ -20,10 +22,10 @@ jobs:
2022
- name: Install dependencies
2123
run: |
2224
python -m pip install --upgrade pip
23-
pip install setuptools wheel twine
25+
pip install build
2426
2527
- name: Build
26-
run: python setup.py sdist bdist_wheel
28+
run: python -m build
2729

2830
- name: Publish to GitHub Releases
2931
uses: softprops/action-gh-release@v1

.github/workflows/run-api-tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@v6
25+
with:
26+
fetch-depth: 0
2527
- name: Set up Python
2628
uses: actions/setup-python@v6
2729
with:
2830
python-version: '3.9'
2931
- name: Build wheel
3032
run: |
3133
python -m pip install --upgrade pip
32-
pip install wheel
33-
python setup.py bdist_wheel --universal
34+
pip install build
35+
python -m build
3436
3537
- name: Install wheel
3638
run: |

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build-system]
2+
requires = ["setuptools>=64", "setuptools_scm>=8", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools_scm]

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
setup(
77
name='vecto-sdk',
8-
version='0.2.3',
98
author='Xpress AI',
109
author_email='eduardo@xpress.ai',
1110
description='Official Python SDK for Vecto',

0 commit comments

Comments
 (0)