Skip to content

Commit f9fdebe

Browse files
committed
skip library for doc-only
1 parent 08cde8c commit f9fdebe

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ python:
33
- 3.6
44
sudo: false
55
dist: trusty
6-
addons:
7-
apt:
8-
packages:
9-
- libgpiod1
6+
## we need that for actual tests
7+
#addons:
8+
# apt:
9+
# packages:
10+
# - libgpiod1
1011

1112
env:
1213
- CHECK_DOCS=1

trio_gpio/libgpiod.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,10 @@
297297
"""
298298
)
299299

300-
lib = ffi.dlopen("libgpiod.so.1")
300+
try:
301+
lib = ffi.dlopen("libgpiod.so.1")
302+
except OSError:
303+
lib = None # may fail if we're only building docs
301304

302305
DIRECTION_INPUT = lib.GPIOD_LINE_REQUEST_DIRECTION_INPUT
303306
DIRECTION_OUTPUT = lib.GPIOD_LINE_REQUEST_DIRECTION_OUTPUT

0 commit comments

Comments
 (0)