Skip to content

Commit

Permalink
Build: abi3-py38
Browse files Browse the repository at this point in the history
  • Loading branch information
deedy5 committed Jul 19, 2024
1 parent 6330be6 commit 75f1fbe
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 42 deletions.
92 changes: 51 additions & 41 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is autogenerated by maturin v1.5.1
# This file is autogenerated by maturin v1.7.0
# To update, run
#
# maturin generate-ci github -o .github/workflows/CI.yml --pytest --zig
Expand Down Expand Up @@ -29,53 +29,50 @@ jobs:
target: x86_64
- runner: ubuntu-latest
target: aarch64
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.9', 'pypy3.10']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
args: --release --out dist --zig -i ${{ matrix.python-version }}
args: --release --out dist --zig
sccache: 'true'
manylinux: auto
env:
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}-${{ matrix.python-version }}
name: wheels-linux-${{ matrix.platform.target }}
path: dist
- name: pytest
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
pip install pytest
pytest
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' && !startsWith(matrix.python-version, 'pypy')}}
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.platform.target }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends software-properties-common gpg gpg-agent curl
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get install -y python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip pytest
run: |
python${{ matrix.python-version }} -m venv venv
venv/bin/pip install -U pip wheel pytest
venv/bin/pip install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
venv/bin/python -m pytest
set -e
pip3 install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
pytest
musllinux:
runs-on: ${{ matrix.platform.runner }}
Expand All @@ -87,39 +84,53 @@ jobs:
target: x86_64
- runner: ubuntu-latest
target: aarch64
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.9', 'pypy3.10']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
args: --release --out dist --zig -i ${{ matrix.python-version }}
args: --release --out dist --zig
sccache: 'true'
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}-${{ matrix.python-version }}
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist
- name: QEMU
if: matrix.platform.target != 'x86_64'
uses: docker/setup-qemu-action@v3
- name: pytest
if: ${{ !startsWith(matrix.python-version, 'pypy')}}
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
uses: addnab/docker-run-action@v3
with:
image: quay.io/pypa/musllinux_1_2_${{ matrix.platform.target }}:latest
image: alpine:latest
options: -v ${{ github.workspace }}:/io -w /io
run: |
python${{ matrix.python-version }} -m venv venv
venv/bin/pip install -U pip wheel pytest
venv/bin/pip install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
venv/bin/python -m pytest
set -e
apk add py3-pip py3-virtualenv
python3 -m virtualenv .venv
source .venv/bin/activate
pip install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
pip install pytest
pytest
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'x86') }}
uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.platform.target }}
distro: alpine_latest
githubToken: ${{ github.token }}
install: |
apk add py3-virtualenv
run: |
set -e
python3 -m virtualenv .venv
source .venv/bin/activate
pip install pytest
pip install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
pytest
windows:
runs-on: ${{ matrix.platform.runner }}
Expand All @@ -129,32 +140,32 @@ jobs:
platform:
- runner: windows-latest
target: x64
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.x
architecture: ${{ matrix.platform.target }}
- name: Install nasm
run: choco install nasm
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
args: --release --out dist -i ${{ matrix.python-version }}
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}-${{ matrix.python-version }}
name: wheels-windows-${{ matrix.platform.target }}
path: dist
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/Scripts/activate
pip install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
pip install pytest
pytest
Expand All @@ -169,28 +180,27 @@ jobs:
target: x86_64
- runner: macos-14
target: aarch64
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
args: --release --out dist -i ${{ matrix.python-version }}
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}-${{ matrix.python-version }}
name: wheels-macos-${{ matrix.platform.target }}
path: dist
- name: pytest
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
pip install pytest
pytest
Expand Down Expand Up @@ -236,7 +246,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: 3.x
- name: Install dependencies
run: |
sleep 30 # Wait for the package to be available on PyPI
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name = "pyreqwest_impersonate"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.22", features = ["extension-module", "indexmap"] }
pyo3 = { version = "0.22", features = ["extension-module", "abi3-py38", "indexmap"] }
reqwest-impersonate = { version = "0.11", default-features = false, features = [
"cookies",
"boring-tls",
Expand Down

0 comments on commit 75f1fbe

Please sign in to comment.