From cbbd2d7f0765ec6c3c88753734ed39b9fd5d4708 Mon Sep 17 00:00:00 2001 From: Ben Raz Date: Sat, 30 Jul 2022 19:22:30 +0300 Subject: [PATCH 1/2] Adapt CI to build musllinux wheels - Install required apk packages for Alpine tests. Signed-off-by: Ben Raz --- HISTORY.rst | 1 + INSTALL.rst | 4 ++-- pyproject.toml | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 0f84d59f4..5e5410614 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,7 @@ **Enhancements** +- 2126_, [Linux]: build and test ``musllinux`` wheels. (patch by Ben Raz) - 2343_, [FreeBSD]: filter `net_connections()`_ returned list in C instead of Python, and avoid to retrieve unnecessary connection types unless explicitly asked. E.g., on an IDLE system with few IPv6 connections this will run around diff --git a/INSTALL.rst b/INSTALL.rst index e3dab9cb4..2a72f791c 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -61,7 +61,7 @@ OpenBSD :: - export PKG_PATH=http://ftp.eu.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -m`/ + export PKG_PATH=https://ftp.eu.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -m`/ pkg_add -v python3 gcc pip install psutil @@ -72,7 +72,7 @@ Assuming Python 3.11 (the most recent at the time of writing): :: - export PKG_PATH="http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All" + export PKG_PATH="https://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All" pkg_add -v pkgin pkgin install python311-* gcc12-* py311-setuptools-* py311-pip-* python3.11 -m pip install psutil diff --git a/pyproject.toml b/pyproject.toml index 6f2aeb032..fee3a3a69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -167,7 +167,7 @@ spaces_indent_inline_array = 4 trailing_comma_inline_array = true [tool.cibuildwheel] -skip = ["*-musllinux*", "pp*"] +skip = "pp*" test-command = [ "env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python {project}/psutil/tests/runner.py", "env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python {project}/psutil/tests/test_memleaks.py", @@ -177,6 +177,10 @@ test-extras = "test" [tool.cibuildwheel.macos] archs = ["arm64", "x86_64"] +[[tool.cibuildwheel.overrides]] +select = "*-musllinux*" +before-all = "apk --no-cache add coreutils procps" + [build-system] build-backend = "setuptools.build_meta" requires = ["setuptools>=43", "wheel"] From 7972be87d3c79d42577109b9c97ee56bd80dbddc Mon Sep 17 00:00:00 2001 From: Ben Raz Date: Thu, 15 Sep 2022 21:07:50 +0300 Subject: [PATCH 2/2] Run ifconfig tests in Python 3 CI Python 3 manylinux CI image does not have net-tools (hence ifconfig) pre-installed, so tests using it were skippied altogether. Signed-off-by: Ben Raz --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index fee3a3a69..81929ec36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -177,6 +177,9 @@ test-extras = "test" [tool.cibuildwheel.macos] archs = ["arm64", "x86_64"] +[tool.cibuildwheel.linux] +before-all = "yum install -y net-tools" + [[tool.cibuildwheel.overrides]] select = "*-musllinux*" before-all = "apk --no-cache add coreutils procps"