Skip to content
Merged
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
13 changes: 6 additions & 7 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v3.1.4
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_ARCHS_LINUX: auto
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
fail-fast: false
matrix:
pyver: [cp310, cp311, cp312, cp313, cp313t, cp314, cp314t]
arch: [aarch64, ppc64le]
arch: [aarch64, ppc64le, riscv64]

steps:
- name: Checkout repos
Expand All @@ -74,12 +74,11 @@ jobs:
uses: docker/setup-qemu-action@v3

- name: Build wheels
uses: pypa/cibuildwheel@v3.1.4
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_ARCHS: ${{matrix.arch}}

# Tests mostly fail because of some confusion with the python interpreter
CIBW_TEST_COMMAND: pytest --color=yes -m 'not embedded and not skip_on_qemu' {project}/tests

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -100,7 +99,7 @@ jobs:
uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v3.1.4
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_BUILD: pp*
CIBW_TEST_COMMAND: pytest --color=yes -m 'not embedded' {project}/tests
Expand Down Expand Up @@ -131,7 +130,7 @@ jobs:
uses: docker/setup-qemu-action@v3

- name: Build wheels
uses: pypa/cibuildwheel@v3.1.4
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_BUILD: pp*

Expand Down
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Version 1.3.8 (unreleased)
- Add support for Python 3.15.
- Fix segfault calling setproctitle() after clearenv() on Python 3.15
(issue #157).
- Add support for riscv64 (issue #156).


Version 1.3.7
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ enable = [
"pypy",
]
test-extras = ["test"]

[[tool.cibuildwheel.overrides]]
select = "*riscv64*"
before-all = ["dnf install -y --setopt=install_weak_deps=False procps-ng"]
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def pytest_configure(config):
config.addinivalue_line(
"markers", "embedded: the test create an embedded executable"
)
config.addinivalue_line(
"markers", "skip_on_qemu: the test fail under qemu virtualisation"
)


skip_if_win32 = pytest.mark.skipif(
Expand Down
7 changes: 7 additions & 0 deletions tests/setproctitle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def test_init_getproctitle():
assert rv == sys.executable + " -u\n"


@pytest.mark.skip_on_qemu
def test_setproctitle():
"""setproctitle() can set the process title, duh."""
rv = run_script(
Expand Down Expand Up @@ -172,6 +173,7 @@ def test_environ():
assert path.endswith("fakepath"), path


@pytest.mark.skip_on_qemu
def test_issue_8(tmp_pypath):
"""Test that the module works with 'python -m'."""
module = "spt_issue_8"
Expand All @@ -196,6 +198,7 @@ def test_issue_8(tmp_pypath):
assert title == "Hello, module!"


@pytest.mark.skip_on_qemu
def test_large_cmdline(tmp_pypath):
"""Test with a 64KB command line."""
module = "longargs"
Expand All @@ -220,6 +223,7 @@ def test_large_cmdline(tmp_pypath):
assert title == "Hello, long!"


@pytest.mark.skip_on_qemu
def test_unicode():
"""Title can contain unicode characters."""
snowman = "\u2603"
Expand Down Expand Up @@ -274,6 +278,7 @@ def test_unicode():
pytest.fail("unexpected ps output: %r" % title)


@pytest.mark.skip_on_qemu
def test_weird_args():
"""No problem with encoded arguments."""
euro = "\u20ac"
Expand Down Expand Up @@ -301,6 +306,7 @@ def test_weird_args():
assert title == "Hello, weird args!"


@pytest.mark.skip_on_qemu
def test_weird_path(tmp_path, spt_directory):
"""No problem with encoded argv[0] path."""
_check_4388()
Expand Down Expand Up @@ -394,6 +400,7 @@ def test_embedded_many_args(pyrun, spt_directory):


@skip_if_no_proc_env
@pytest.mark.skip_on_qemu
def test_noenv():
"""Check that SPT_NOENV avoids clobbering environ."""
env = os.environ.copy()
Expand Down
5 changes: 5 additions & 0 deletions tests/setthreadtitle_test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import os # noqa
import sys # noqa

import pytest

from .conftest import run_script, skip_if_win32, skip_if_no_proc_tasks

pytestmark = [skip_if_win32, skip_if_no_proc_tasks]


@pytest.mark.skip_on_qemu
def test_thread_title_unchanged():
rv = run_script(
"""
Expand All @@ -29,6 +32,7 @@ def print_stuff():
assert before == gtt


@pytest.mark.skip_on_qemu
def test_set_thread_title():
run_script(
"""
Expand All @@ -43,6 +47,7 @@ def test_set_thread_title():
)


@pytest.mark.skip_on_qemu
def test_set_threads_title():
run_script(
"""
Expand Down
Loading