@@ -3,35 +3,40 @@ ARG distrover
3
3
4
4
FROM $distro:$distrover
5
5
6
- ARG distro
7
- ARG distrover
8
-
9
6
RUN apt-get update
10
7
RUN apt-get install -y build-essential fakeroot debhelper git
11
- RUN apt-get install -y python3-all python3-pip
8
+ RUN apt-get install -y python3-all python3-pip python3-venv
12
9
RUN apt-get install -y ruby ruby-dev
13
- RUN apt-get install -y python-all python-pip
14
10
15
- RUN gem install fpm
11
+ RUN gem install fpm package_cloud
16
12
17
- RUN pip2 install virtualenv-tools
18
- RUN pip3 install virtualenv
13
+ RUN pip3 install virtualenv virtualenv-tools3
19
14
RUN virtualenv -p python3 /vdirsyncer/env/
20
15
16
+ # See https://github.com/jordansissel/fpm/issues/1106#issuecomment-461678970
17
+ RUN pip3 uninstall -y virtualenv
18
+ RUN echo 'python3 -m venv "$@"' > /usr/local/bin/virtualenv
19
+ RUN chmod +x /usr/local/bin/virtualenv
20
+
21
21
COPY . /vdirsyncer/vdirsyncer/
22
22
WORKDIR /vdirsyncer/vdirsyncer/
23
23
RUN mkdir /vdirsyncer/pkgs/
24
24
25
25
RUN basename *.tar.gz .tar.gz | cut -d'-' -f2 | sed -e 's/\. dev/~/g' | tee version
26
26
RUN (echo -n *.tar.gz; echo '[google]' ) | tee requirements.txt
27
- RUN . /vdirsyncer/env/bin/activate; fpm -s virtualenv -t deb \
28
- -n "vdirsyncer-latest" \
29
- -v "$(cat version)" \
30
- --prefix /opt/venvs/vdirsyncer-latest \
31
- requirements.txt
27
+ RUN fpm --verbose \
28
+ --input-type virtualenv \
29
+ --output-type deb \
30
+ --name "vdirsyncer-latest" \
31
+ --version "$(cat version)" \
32
+ --prefix /opt/venvs/vdirsyncer-latest \
33
+ --depends python3 \
34
+ requirements.txt
32
35
33
36
RUN mv /vdirsyncer/vdirsyncer/*.deb /vdirsyncer/pkgs/
34
37
35
38
WORKDIR /vdirsyncer/pkgs/
36
39
RUN dpkg -i *.deb
40
+
41
+ # Check that it works:
37
42
RUN LC_ALL=C.UTF-8 LANG=C.UTF-8 /opt/venvs/vdirsyncer-latest/bin/vdirsyncer --version
0 commit comments