summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-05-24 20:23:48 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2020-05-24 20:23:48 +0200
commit597b310c9a6ffc0067772bb5d6cf2570e3286edd (patch)
tree37164dcf825dd6781bb50b387b738754726ea13d
parentbd4d2bf420e1dfa3298143daebd485b97335b256 (diff)
downloadpsutil-597b310c9a6ffc0067772bb5d6cf2570e3286edd.tar.gz
import build_wheel from 1762 PR
-rwxr-xr-x.ci/travis/install.sh10
-rw-r--r--.github/workflows/build_wheel.yml33
-rwxr-xr-xpsutil/tests/test_connections.py3
-rwxr-xr-xpsutil/tests/test_contracts.py3
4 files changed, 31 insertions, 18 deletions
diff --git a/.ci/travis/install.sh b/.ci/travis/install.sh
index f06e43d5..7c364b37 100755
--- a/.ci/travis/install.sh
+++ b/.ci/travis/install.sh
@@ -24,6 +24,14 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then
pyenv install 3.6.6
pyenv virtualenv 3.6.6 psutil
;;
+ py37)
+ pyenv install 3.7.6
+ pyenv virtualenv 3.7.6 psutil
+ ;;
+ py38)
+ pyenv install 3.8.2
+ pyenv virtualenv 3.8.2 psutil
+ ;;
esac
pyenv rehash
pyenv activate psutil
@@ -33,4 +41,4 @@ if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]] || [[ $PYVER == 'py27' ]]; then
pip install -U ipaddress mock
fi
-pip install -U coverage coveralls flake8 setuptools concurrencytest
+pip install -U coverage coveralls flake8 setuptools
diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml
index 7d230b90..a46952dc 100644
--- a/.github/workflows/build_wheel.yml
+++ b/.github/workflows/build_wheel.yml
@@ -3,17 +3,18 @@ name: Build wheel
on: [push, pull_request]
jobs:
- wheel_without_test:
- name: build wheel for ${{ matrix.os }}
+ wheel:
+ name: build wheel with test for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
env:
- CIBW_SKIP: "pp27-*win* cp27-*manylinux* pp-*manylinux*"
- CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
- CIBW_MANYLINUX_I686_IMAGE: manylinux2014
+ CIBW_SKIP: "pp*win32 *38*macosx*"
+ CIBW_TEST_COMMAND: python -u -Wa {project}/psutil/tests/runner.py
+ CIBW_TEST_COMMAND_MACOS: LC_ALL='en_US.utf8' python -Wa {project}/psutil/tests/runner.py
+ CIBW_TEST_EXTRAS: test
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
@@ -35,23 +36,21 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v1
with:
- name: wheels2
+ name: wheels
path: wheelhouse
- wheel:
- name: build wheel for ${{ matrix.os }}
+ wheel_problematic:
+ name: build problematic wheel for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
- os: [windows-latest, macos-latest, ubuntu-latest]
+ os: [macos-latest]
env:
- CIBW_SKIP: "pp27-*win* *27* cp27-*manylinux* pp-*manylinux*"
+ CIBW_BUILD: "*38*macosx*"
CIBW_TEST_COMMAND: python -Wa {project}/psutil/tests/runner.py
- CIBW_TEST_COMMAND_MACOS: LC_ALL='en_US.utf8' python -Wa {project}/psutil/tests/runner.py
+ CIBW_TEST_COMMAND_MACOS: LC_ALL='en_US.utf8' PYTHONUNBUFFERED=1 gtimeout -k 5 600 python -Wa {project}/psutil/tests/runner.py
CIBW_TEST_EXTRAS: test
- CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
- CIBW_MANYLINUX_I686_IMAGE: manylinux2014
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
@@ -59,10 +58,10 @@ jobs:
with:
python-version: '3.7'
- - name: Install Visual C++ for Python 2.7
- if: startsWith(matrix.os, 'windows')
+ - name: Install coreutils
+ if: startsWith(matrix.os, 'macos')
run: |
- choco install vcpython27 -f -y
+ brew install coreutils
- name: "install cibuildwheel"
run: pip install cibuildwheel==1.4.1
@@ -73,5 +72,5 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v1
with:
- name: wheels
+ name: wheels3
path: wheelhouse
diff --git a/psutil/tests/test_connections.py b/psutil/tests/test_connections.py
index 8a9a6eb4..1a9b32f7 100755
--- a/psutil/tests/test_connections.py
+++ b/psutil/tests/test_connections.py
@@ -38,6 +38,7 @@ from psutil.tests import enum
from psutil.tests import get_free_port
from psutil.tests import HAS_CONNECTIONS_UNIX
from psutil.tests import PsutilTestCase
+from psutil.tests import reap_children
from psutil.tests import serialrun
from psutil.tests import skip_on_access_denied
from psutil.tests import SKIP_SYSCONS
@@ -392,6 +393,8 @@ class TestFilters(_ConnTestCase):
@skip_on_access_denied(only_if=MACOS)
def test_combos(self):
+ reap_children()
+
def check_conn(proc, conn, family, type, laddr, raddr, status, kinds):
all_kinds = ("all", "inet", "inet4", "inet6", "tcp", "tcp4",
"tcp6", "udp", "udp4", "udp6")
diff --git a/psutil/tests/test_contracts.py b/psutil/tests/test_contracts.py
index 35ab61e0..51bbb9f0 100755
--- a/psutil/tests/test_contracts.py
+++ b/psutil/tests/test_contracts.py
@@ -34,6 +34,7 @@ from psutil._compat import long
from psutil._compat import range
from psutil.tests import create_sockets
from psutil.tests import enum
+from psutil.tests import GITHUB_WHEELS
from psutil.tests import HAS_CPU_FREQ
from psutil.tests import HAS_NET_IO_COUNTERS
from psutil.tests import HAS_SENSORS_FANS
@@ -85,6 +86,7 @@ class TestAvailConstantsAPIs(PsutilTestCase):
ae(hasattr(psutil, "IOPRIO_LOW"), WINDOWS)
ae(hasattr(psutil, "IOPRIO_VERYLOW"), WINDOWS)
+ @unittest.skipIf(GITHUB_WHEELS, "not exposed via GITHUB_WHEELS")
def test_linux_rlimit(self):
ae = self.assertEqual
ae(hasattr(psutil, "RLIM_INFINITY"), LINUX)
@@ -149,6 +151,7 @@ class TestAvailProcessAPIs(PsutilTestCase):
def test_ionice(self):
self.assertEqual(hasattr(psutil.Process, "ionice"), LINUX or WINDOWS)
+ @unittest.skipIf(GITHUB_WHEELS, "not exposed via GITHUB_WHEELS")
def test_rlimit(self):
# requires Linux 2.6.36
self.assertEqual(hasattr(psutil.Process, "rlimit"), LINUX)