Skip to content

Commit

Permalink
added support for apple m1 users
Browse files Browse the repository at this point in the history
  • Loading branch information
gmontza-r7 committed Feb 14, 2024
1 parent 7fc7b00 commit c8fa79e
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 18 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
Expand All @@ -32,10 +32,32 @@ jobs:
profile: minimal
toolchain: stable
override: true
- name: Install Cross-compilers (macOS)
if: matrix.os == 'macos-latest'
run: |
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
- name: Publish Package
uses: messense/maturin-action@v1
uses: PyO3/maturin-action@v1
with:
command: publish
args: --username=__token__ --no-sdist --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
args: --username=__token__ ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' && '' || '--no-sdist' }} --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
env:
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
if: matrix.os != 'macos-latest'
- name: Publish macOS (x86_64) Package
if: matrix.os == 'macos-latest'
uses: PyO3/maturin-action@v1
with:
command: publish
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=x86_64-apple-darwin --no-sdist
env:
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
- name: Publish macOS (arm64) Package
if: matrix.os == 'macos-latest'
uses: PyO3/maturin-action@v1
with:
command: publish
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=aarch64-apple-darwin --no-sdist
env:
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
15 changes: 1 addition & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pysubstringsearch"
version = "0.7.0"
version = "0.7.1"
authors = ["Gal Ben David <gal@intsights.com>"]
edition = "2021"
description = "A Python library written in Rust that searches for substrings quickly using a Suffix Array"
Expand All @@ -19,19 +19,6 @@ keywords = [
]

[package.metadata.maturin]
requires-python = ">=3.7"
classifier = [
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Rust",
]

[lib]
name = "pysubstringsearch"
Expand Down
197 changes: 197 additions & 0 deletions poetry.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sdist-include = [

[tool.poetry]
name = "pysubstringsearch"
version = "0.7.0"
version = "0.7.1"
authors = ["Gal Ben David <gal@intsights.com>"]
description = "A Python library written in Rust that searches for substrings quickly using a Suffix Array"
readme = "README.md"
Expand Down

0 comments on commit c8fa79e

Please sign in to comment.