Skip to content

Commit

Permalink
zzz
Browse files Browse the repository at this point in the history
  • Loading branch information
dirvine committed Nov 30, 2024
1 parent 5655845 commit 6385d48
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 10 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,32 @@ jobs:
id-token: write
contents: read
steps:
# Download all wheels
- name: Download all wheels
- name: Create dist directory
run: mkdir -p dist

# Download all artifacts at once
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
path: dist

- name: Display structure of downloaded files
run: ls -R dist
- name: Prepare dist directory
run: |
find dist -type f -name "*.whl" -exec mv {} dist/ \;
find dist -type f -name "*.tar.gz" -exec mv {} dist/ \;
rm -rf dist/*/
echo "Final dist directory contents:"
ls -la dist/
- name: Check if version exists
run: |
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}" # Remove 'v' prefix if present
if pip index versions self_encryption | grep -q "${VERSION}"; then
echo "Version ${VERSION} already exists on PyPI"
exit 1
fi
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ harness = false
[lib]
name = "self_encryption"
crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ self-encryption = "self_encryption.cli:cli"
features = ["python"]
module-name = "self_encryption._self_encryption"
bindings = "pyo3"
python-source = "python"

File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions tests/test_bindings.py → python/tests/test_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from typing import List
import pytest
from self_encryption import (
DataMap,
XorName,
encrypt_from_file,
decrypt_from_storage,
streaming_decrypt_from_storage,
Expand Down
1 change: 0 additions & 1 deletion tests/test_cli.py → python/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from click.testing import CliRunner
from self_encryption.cli import cli
import tempfile
import os
from pathlib import Path

@pytest.fixture
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ mod encrypt;
mod encryption;
mod error;
#[cfg(feature = "python")]
mod python;
mod bindings {
include!("../python/bindings/mod.rs");
}
pub mod test_helpers;
mod utils;

Expand Down

0 comments on commit 6385d48

Please sign in to comment.