Skip to content

Commit 477d059

Browse files
authored
Task CS-2206: PyDomainExtractor | Add arm64 build on deployment
2 parents d1769d9 + 4621d15 commit 477d059

File tree

4 files changed

+53
-18
lines changed

4 files changed

+53
-18
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,32 @@ jobs:
3232
profile: minimal
3333
toolchain: stable
3434
override: true
35+
- name: Install Cross-compilers (macOS)
36+
if: matrix.os == 'macos-latest'
37+
run: |
38+
rustup target add x86_64-apple-darwin
39+
rustup target add aarch64-apple-darwin
3540
- name: Publish Package
3641
uses: PyO3/maturin-action@v1
3742
with:
3843
command: publish
3944
args: --username=__token__ ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' && '' || '--no-sdist' }} --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
4045
env:
4146
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
47+
if: matrix.os != 'macos-latest'
48+
- name: Publish macOS (x86_64) Package
49+
if: matrix.os == 'macos-latest'
50+
uses: PyO3/maturin-action@v1
51+
with:
52+
command: publish
53+
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=x86_64-apple-darwin
54+
env:
55+
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
56+
- name: Publish macOS (arm64) Package
57+
if: matrix.os == 'macos-latest'
58+
uses: PyO3/maturin-action@v1
59+
with:
60+
command: publish
61+
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=aarch64-apple-darwin
62+
env:
63+
MATURIN_PASSWORD: ${{ secrets.pypi_password }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
__pycache__/
44
*.py[cod]
55
*$py.class
6+
.vscode/
67

78
# C extensions
89
*.so
@@ -100,7 +101,7 @@ ipython_config.py
100101
# This is especially recommended for binary packages to ensure reproducibility, and is more
101102
# commonly ignored for libraries.
102103
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103-
#poetry.lock
104+
poetry.lock
104105

105106
# pdm
106107
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.

Cargo.toml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pydomainextractor"
3-
version = "0.12.0"
3+
version = "0.13.0"
44
authors = ["Gal Ben David <[email protected]>"]
55
edition = "2021"
66
description = "A blazingly fast domain extraction library written in Rust"
@@ -17,21 +17,6 @@ keywords = [
1717
"pyo3",
1818
]
1919

20-
[package.metadata.maturin]
21-
requires-python = ">=3.7"
22-
classifier = [
23-
"License :: OSI Approved :: MIT License",
24-
"Operating System :: MacOS",
25-
"Operating System :: Microsoft",
26-
"Operating System :: POSIX :: Linux",
27-
"Programming Language :: Python :: 3.7",
28-
"Programming Language :: Python :: 3.8",
29-
"Programming Language :: Python :: 3.9",
30-
"Programming Language :: Python :: 3.10",
31-
"Programming Language :: Python :: 3.11",
32-
"Programming Language :: Rust",
33-
]
34-
3520
[lib]
3621
name = "pydomainextractor"
3722
crate-type = ["cdylib"]

pyproject.toml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
[project]
2+
name = "pydomainextractor"
3+
version = "0.13.0"
4+
description = "A blazingly fast domain extraction library written in Rust"
5+
authors = [
6+
{email = "[email protected]"},
7+
{name = "Gal Ben David"}
8+
]
9+
requires-python = ">=3.7"
10+
license = "MIT"
11+
classifiers = [
12+
"License :: OSI Approved :: MIT License",
13+
"Operating System :: MacOS",
14+
"Operating System :: Microsoft",
15+
"Operating System :: POSIX :: Linux",
16+
"Programming Language :: Python :: 3.7",
17+
"Programming Language :: Python :: 3.8",
18+
"Programming Language :: Python :: 3.9",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Rust",
22+
]
23+
24+
[project.urls]
25+
repository = "https://github.com/intsights/pydomainextractor"
26+
homepage = "https://github.com/intsights/pydomainextractor"
27+
128
[build-system]
229
requires = ["maturin>=0.14,<0.15"]
330
build-backend = "maturin"
@@ -59,4 +86,4 @@ addopts = [
5986
]
6087
testpaths = [
6188
"tests",
62-
]
89+
]

0 commit comments

Comments
 (0)