File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,18 @@ ENV LANG C.UTF-8
66
77# Setup base
88RUN apk add --no-cache \
9- python3 \
10- git \
11- socat
9+ python3 \
10+ git \
11+ socat \
12+ libstdc++ \
13+ && apk add --no-cache --virtual .build-dependencies \
14+ make \
15+ python3-dev \
16+ g++ \
17+ && pip3 install --no-cache-dir \
18+ uvloop \
19+ cchardet \
20+ && apk del .build-dependencies
1221
1322# Install HassIO
1423COPY . /usr/src/hassio
Original file line number Diff line number Diff line change 1010_LOGGER = logging .getLogger (__name__ )
1111
1212
13+ def attempt_use_uvloop ():
14+ """Attempt to use uvloop."""
15+ try :
16+ import uvloop
17+ asyncio .set_event_loop_policy (uvloop .EventLoopPolicy ())
18+ except ImportError :
19+ pass
20+
21+
1322# pylint: disable=invalid-name
1423if __name__ == "__main__" :
1524 bootstrap .initialize_logging ()
25+ attempt_use_uvloop ()
1626 loop = asyncio .get_event_loop ()
1727
1828 if not bootstrap .check_environment ():
You can’t perform that action at this time.
0 commit comments