Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,30 @@ on:
jobs:
CI:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}

# Build wheel ONLY on push (not on PR)
- name: Build Wheel
if: github.event_name != 'pull_request'
uses: messense/maturin-action@v1
with:
manylinux: off
args: --find-interpreter
- uses: abatilo/actions-poetry@v2.3.0
- name: Run Tests
- name: Install poetry
uses: abatilo/actions-poetry@v4
- uses: dtolnay/rust-toolchain@stable
with: { toolchain: stable }
- name: Install deps & test
run: |
poetry install
poetry install --no-root
poetry run maturin develop
poetry run pytest
67 changes: 42 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
tags:
- v*
pull_request:
branches:
- 'main'

Expand All @@ -14,75 +13,93 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
target: [x64, aarch64]
steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: messense/maturin-action@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ matrix.target }}
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wheels
name: macos-wheels-${{ matrix.python-version }}-${{matrix.target}}
path: dist

windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
target: [x64, x86]
steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: messense/maturin-action@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ matrix.target }}
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wheels
name: windows-wheels-${{ matrix.python-version }}-${{matrix.target}}
path: dist

linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
target: [x86_64, i686, aarch64, armv7]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build Wheels
uses: messense/maturin-action@v1
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ matrix.target }}
manylinux: auto
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wheels
name: linux-wheels-${{ matrix.python-version }}-${{matrix.target}}
path: dist

# TODO Add pypy

release:
name: Release
publish:
name: Publish to PyPI (Twine)
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ macos, linux, windows]
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
- uses: actions/setup-python@v2
- uses: actions/download-artifact@v4
with:
python-version: 3.9
- name: Publish to PyPi
pattern: '*'
merge-multiple: true
- uses: actions/setup-python@v5
with: { python-version: "3.12" }
- name: Upload with twine
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
pip install --upgrade twine
python -m pip install --upgrade twine
twine upload --skip-existing *
44 changes: 25 additions & 19 deletions poetry.lock

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

24 changes: 15 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[project]
name = "didkit"
name = "dlinc-didkit" # <-- PyPI dist name
version = "0.1.0"
description = "Fork of spruceid/didkit-python maintained by dLinc. Library for Verifiable Credentials and Decentralized Identifiers."
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Rust",
Expand All @@ -8,25 +10,29 @@ classifiers = [
"Topic :: Security",
]

# [project.urls]
# homepage = "https://github.com/spruceid/didkit-python"
# documentation = "https://github.com/spruceid/didkit-python"
# repository = "https://github.com/spruceid/didkit-python"
[project.urls]
Homepage = "https://github.com/dogwoodlogic/didkit-python"
Source = "https://github.com/dogwoodlogic/didkit-python"
Issues = "https://github.com/dogwoodlogic/didkit-python/issues"
Upstream = "https://github.com/spruceid/didkit-python"

[tool.poetry]
name = "didkit"
name = "dlinc-didkit" # keep in sync with [project].name
version = "0.1.0"
description = "Library for Verifiable Credentials and Decentralized Identifiers."
authors = [ "Spruce Systems, Inc." ]
description = "Fork of spruceid/didkit-python. Library for Verifiable Credentials and Decentralized Identifiers."

[tool.poetry.dependencies]
python = "^3.7"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
maturin = "^0.14.15"
pytest = "^7.2.2"
pytest-asyncio = "^0.20.3"

[build-system]
requires = ["maturin>=0.14,<0.15"]
build-backend = "maturin"

[tool.maturin]
# Critical - This keeps the Python import as 'didkit'
module-name = "didkit"