jessfraz / dockerfiles

Various Dockerfiles I use on the desktop and on servers.
https://blog.jessfraz.com/post/docker-containers-on-the-desktop/
MIT License
13.65k stars 2.55k forks source link

Update gcalcli image to python3 #504

Closed volker-fr closed 4 years ago

volker-fr commented 4 years ago

The latest gcalcli uses shutil.get_terminal_size which isn't backported to python2's shutil.

This PR uses python3 instead of python2.

Error received with the current image:

% docker run --rm -t \
     -v /etc/localtime:/etc/localtime:ro \
     -v /tmp/gcalcli_oauth:/home/gcalcli/.gcalcli_oauth \
     -u $(uid -u):$(uid -g) \
     -v /tmp/gcalclirc:/home/gcalcli/.gcalclirc \
     --name gcalcli jess/gcalcli \
         --nocolor \
         --lineart ascii \
         --nocache \
         calw 2019-09-30 3 \
         --width 15 \
         --monday                                                                   
Traceback (most recent call last):                                                                               
  File "/usr/bin/gcalcli", line 7, in <module>                                                                   
    from gcalcli.cli import main                                                                                 
  File "/usr/lib/python2.7/site-packages/gcalcli/cli.py", line 30, in <module>                                   
    from gcalcli.argparsers import get_argument_parser, handle_unparsed                                          
  File "/usr/lib/python2.7/site-packages/gcalcli/argparsers.py", line 8, in <module>                             
    from shutil import get_terminal_size                                                                         
ImportError: cannot import name get_terminal_size
jessfraz commented 4 years ago

thanks!