Skip to content

Commit

Permalink
fix: pypi
Browse files Browse the repository at this point in the history
- Add a new method to library as pypi won't allow us to upload 0.3.6 when nothing has changed.

- update maturin version required in pyproject.toml

- fix maturin-action to directly access the sub folders that we have downloaded
  • Loading branch information
kevaundray committed Sep 24, 2024
1 parent 85939e5 commit aa05dcd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos]
steps:
- uses: actions/checkout@v3 # Checkout the repository so we can have the pyptoject.toml file
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true

- name: Display structure of downloaded artifacts
run: ls -R wheels-*

- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
uses: PyO3/maturin-action@v1
with:
command: upload
args: --skip-existing *
args: --non-interactive --skip-existing wheels-*/*
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "py_arkworks_bls12381"
version = "0.3.6"
version = "0.3.7"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin>=0.14,<0.15"]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[project]
Expand All @@ -9,6 +9,9 @@ classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]


3 changes: 3 additions & 0 deletions src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ impl Scalar {
fn is_zero(&self) -> bool {
self.0.is_zero()
}
fn is_one(&self) -> bool {
self.0.is_one()
}

fn to_le_bytes(&self) -> PyResult<[u8; SCALAR_SIZE]> {
let mut bytes = [0u8; SCALAR_SIZE];
Expand Down

0 comments on commit aa05dcd

Please sign in to comment.