Skip to content

Commit

Permalink
update cli
Browse files Browse the repository at this point in the history
  • Loading branch information
mburridge96 committed Apr 15, 2024
1 parent 03c7aec commit aec3b8c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 63 deletions.
123 changes: 61 additions & 62 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
# This file is autogenerated by maturin v1.4.0
# To update, run
#
# maturin generate-ci github
#
name: CI
name: Python

on:
push:
branches:
- main
- master
tags:
- '*'
branches: [ "main" ]
pull_request:
workflow_dispatch:
branches: [ "main" ]

permissions:
contents: read
env:
PACKAGE_NAME: rocraters
PYTHON_VERSION: "3.7" # to build abi3 wheels

# Modified slightly from crfs-rs Python.yml
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
target: x86_64
args: --release --out dist --sdist -m python/Cargo.toml
- name: Install built wheel - x86_64
run: |
pip install rocraters --no-index --find-links dist --force-reinstall
python -c "import rocraters"
- name: Build wheels - universal2
uses: PyO3/maturin-action@v1
with:
target: universal2-apple-darwin
args: --release --out dist -m python/Cargo.toml
- name: Install built wheel - universal2
run: |
pip install rocraters --no-index --find-links dist --force-reinstall
python -c "import rocraters"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -48,56 +51,52 @@ jobs:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
architecture: ${{ matrix.target }}
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
args: --release --out dist -m python/Cargo.toml
- name: Install built wheel
run: |
pip install rocraters --no-index --find-links dist --force-reinstall
python -c "import rocraters"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

macos:
runs-on: macos-latest
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, aarch64]
target: [x86_64, i686]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -m python/Cargo.toml
- name: Install built wheel
if: matrix.target == 'x86_64'
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --no-index --find-links dist --force-reinstall
python -c "import rocraters"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
3 changes: 2 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ name = "rocraters"
description = "Lightweight Python library for RO-Crate manipulation implemented in Rust"
readme = "README.md"
keywords = ["ro-crate", "rocrate", "research object", "rocraters"]
requires-python = ">=3.8"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Development Status :: 2 - Pre-Alpha",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down

0 comments on commit aec3b8c

Please sign in to comment.