Skip to content

Commit

Permalink
fix: update cargo.toml align versioning for github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Senhaji-Rhazi-Hamza committed Nov 28, 2024
1 parent ab268c4 commit 9855f93
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 30 deletions.
59 changes: 41 additions & 18 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,33 @@ jobs:
with:
python-version: 3.9

- name: Create source distribution
uses: PyO3/maturin-action@v1
with:
command: sdist
args: >
--manifest-path Cargo.toml
--out dist
# - name: Create source distribution
# uses: PyO3/maturin-action@v1
# with:
# command: sdist
# args: >
# --manifest-path Cargo.toml
# --out dist

- name: Build with maturin
run: |
python -m pip install --upgrade pip
pip install maturin==1.1.0
maturin sdist --manifest-path Cargo.toml --out dist
- name: Inspect Source Distribution
run: |
for file in dist/*.tar.gz; do
echo "Inspecting $file"
tar --wildcards -tzf "$file" | grep PKG-INFO || echo "PKG-INFO not found"
tar --wildcards -xOf "$file" */PKG-INFO || echo "Unable to read PKG-INFO"
done
- name: Test sdist
run: |
python -m pip install --upgrade pip
pip install twine
pip install --upgrade --force-reinstall twine
twine check dist/*.tar.gz
pip install --force-reinstall --verbose dist/*.tar.gz
python -c 'from polodb import PoloDB'
Expand All @@ -52,13 +67,13 @@ jobs:
# os: [macos-14]
python-version: ["3.9"] # , "3.10"
# python-version: ["3.10"]
architecture: [x86_64, arm64] # Explicitly define architectures
architecture: [x86_64, aarch64] # Explicitly define architectures
# architecture: [aarch64] # Explicitly define architectures
exclude:
- os: windows-latest
architecture: arm64
architecture: aarch64
- os: macos-latest
architecture: arm64 # macOS 13 on GitHub Actions is only x86_64 (Intel)
architecture: aarch64 # macOS 13 on GitHub Actions is only x86_64 (Intel)
- os: macos-14
architecture: x86_64

Expand All @@ -71,14 +86,22 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# - name: Create source distribution
# uses: PyO3/maturin-action@v1
# with:
# command: build
# args: >
# --manifest-path Cargo.toml
# --profile dist-release
# --out target/wheels

- name: Create source distribution
uses: PyO3/maturin-action@v1
with:
command: build
args: >
--manifest-path Cargo.toml
--profile dist-release
--out target/wheels
run: |
python -m pip install --upgrade pip
pip install maturin==1.1.0
maturin build --manifest-path Cargo.toml --profile dist-release --out target/wheels
- name: Extract Version from pyproject.toml
id: get_version
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[package]
name = "py-binding-polodb"
version = "0.1.2"
name = "polodb_python" # Must match the Python package name
version = "0.1.16"
edition = "2021"
description = "Python bindings for PoloDB"
license = "Apache License"
license-file = "LICENSE.txt"
repository = "https://github.com/PoloDB/polodb-python"
homepage = "https://github.com/PoloDB/polodb-python"
documentation = "https://github.com/PoloDB/polodb-python/blob/main/README.md"

[lib]
# The name of the native library. This is the name which will be used in Python to import the
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "polodb-python"
version = "0.1.15"
version = "0.1.16"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9855f93

Please sign in to comment.