1
- FROM ubuntu:20 .04
1
+ FROM ubuntu:22 .04
2
2
LABEL maintainer="iphydf@gmail.com"
3
3
4
4
RUN apt-get update \
5
5
&& DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
6
6
ca-certificates \
7
7
cmake \
8
- cython \
9
8
gcc \
10
9
g++ \
11
10
git \
@@ -19,23 +18,47 @@ RUN apt-get update \
19
18
python3-pip \
20
19
&& apt-get clean \
21
20
&& rm -rf /var/lib/apt/lists/* \
22
- && pip3 install mypy
21
+ && pip3 install cython mypy
23
22
24
23
WORKDIR /build
25
- RUN git clone --depth=1 https://github.com/TokTok /c-toxcore /build/c-toxcore \
24
+ RUN git clone --recursive -- depth=1 --branch=system https://github.com/iphydf /c-toxcore /build/c-toxcore \
26
25
&& cmake -GNinja -B/build/c-toxcore/_build -H/build/c-toxcore \
27
26
-DBOOTSTRAP_DAEMON=OFF \
28
27
-DENABLE_STATIC=OFF \
29
28
-DMUST_BUILD_TOXAV=ON \
30
29
&& cmake --build /build/c-toxcore/_build --target install --parallel "$(nproc)" \
31
- && ldconfig
30
+ && ldconfig && echo 2
32
31
33
- COPY pytox /build/pytox
32
+ # Tools first, they change less.
34
33
COPY tools /build/tools
34
+ COPY pytox.pxd /build/
35
+ COPY pytox /build/pytox
35
36
36
37
RUN mypy --strict tools/gen_api.py \
37
- && tools/gen_api.py pytox/src/core.pyx /usr/local/include/tox/tox.h > pytox/core.pyx \
38
- && cython pytox/av.pyx pytox/core.pyx
38
+ && tools/gen_api.py pytox/src/core.pyx /usr/local/include > pytox/core.pyx \
39
+ && tools/gen_api.py pytox/src/log.pxd /usr/local/include > pytox/log.pxd \
40
+ && tools/gen_api.py pytox/src/log.pyx /usr/local/include > pytox/log.pyx \
41
+ && tools/gen_api.py pytox/src/memory.pxd /usr/local/include > pytox/memory.pxd \
42
+ && tools/gen_api.py pytox/src/memory.pyx /usr/local/include > pytox/memory.pyx \
43
+ && tools/gen_api.py pytox/src/network.pxd /usr/local/include > pytox/network.pxd \
44
+ && tools/gen_api.py pytox/src/network.pyx /usr/local/include > pytox/network.pyx \
45
+ && tools/gen_api.py pytox/src/options.pxd /usr/local/include > pytox/options.pxd \
46
+ && tools/gen_api.py pytox/src/options.pyx /usr/local/include > pytox/options.pyx \
47
+ && tools/gen_api.py pytox/src/random.pxd /usr/local/include > pytox/random.pxd \
48
+ && tools/gen_api.py pytox/src/random.pyx /usr/local/include > pytox/random.pyx \
49
+ && tools/gen_api.py pytox/src/system.pxd /usr/local/include > pytox/system.pxd \
50
+ && tools/gen_api.py pytox/src/system.pyx /usr/local/include > pytox/system.pyx \
51
+ && tools/gen_api.py pytox/src/time.pxd /usr/local/include > pytox/time.pxd \
52
+ && tools/gen_api.py pytox/src/time.pyx /usr/local/include > pytox/time.pyx \
53
+ && cython -I $PWD -X "language_level=3" --line-directives pytox/av.pyx pytox/core.pyx \
54
+ pytox/error.pyx \
55
+ pytox/log.pyx \
56
+ pytox/memory.pyx \
57
+ pytox/network.pyx \
58
+ pytox/options.pyx \
59
+ pytox/random.pyx \
60
+ pytox/system.pyx \
61
+ pytox/time.pyx
39
62
40
63
COPY setup.py /build/
41
64
RUN python3 setup.py install \
0 commit comments