Skip to content

Commit

Permalink
add sysdeps re. to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Oct 1, 2024
1 parent 7a957bc commit c6f8899
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
CIBW_PRERELEASE_PYTHONS: True
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND:
make -C {project} PYTHON="env python" PSUTIL_SCRIPTS_DIR="{project}/scripts" install-pydeps install print-sysinfo test test-memleaks
make -C {project} PYTHON="env python" PSUTIL_SCRIPTS_DIR="{project}/scripts" install-sysdeps install-pydeps install print-sysinfo test test-memleaks

- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
CIBW_BUILD: 'cp27-*'
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND:
make -C {project} PYTHON="env python" PSUTIL_SCRIPTS_DIR="{project}/scripts" install-pydeps install print-sysinfo test test-memleaks
make -C {project} PYTHON="env python" PSUTIL_SCRIPTS_DIR="{project}/scripts" install-sysdeps install-pydeps install print-sysinfo test test-memleaks

steps:
- uses: actions/checkout@v4
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ifeq ($(UNAME_S),Linux)
HAS_APT = true
else ifneq (,$(shell command -v yum 2> /dev/null))
HAS_YUM = true
else ifneq (,$(shell command -v apk 2> /dev/null))
HAS_APK = true # musl linux
endif
else ifeq ($(UNAME_S),FreeBSD)
FREEBSD = true
Expand Down Expand Up @@ -163,13 +165,17 @@ install-pip: ## Install pip (no-op if already installed).
install-sysdeps:
ifdef HAS_APT
$(SUDO) apt-get install -y python3-dev gcc
$(SUDO) apt-get install -y net-tools coreutils util-linux # for tests
else ifdef HAS_YUM
$(SUDO) yum install -y python3-devel gcc
$(SUDO) yum install -y net-tools coreutils util-linux # for tests
else ifdef HAS_APK
$(SUDO) apk add python3-dev gcc musl-dev linux-headers coreutils procps
else ifdef FREEBSD
$(SUDO) pkg install -y gmake python3 gcc
else ifdef NETBSD
# $(SUDO) /usr/sbin/pkg_add -v pkgin
# $(SUDO) pkgin update
$(SUDO) /usr/sbin/pkg_add -v pkgin
$(SUDO) pkgin update
$(SUDO) pkgin -y install gmake python311-* gcc12-*
else ifdef OPENBSD
$(SUDO) pkg_add gmake gcc python3
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ skip = [
[tool.cibuildwheel.macos]
archs = ["arm64", "x86_64"]

[tool.cibuildwheel.linux]
before-all = "yum install -y net-tools"

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=43", "wheel"]

0 comments on commit c6f8899

Please sign in to comment.