Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Dockerfile to python3 #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adrian-marza-mambu
Copy link

The container can't be built with python2 anymore, so we might as well switch to the python3 packages fully.

The error appears at docker build:

docker build -t review-rot:latest .
...
Step 10/12 : RUN pip install --upgrade pip setuptools && python setup.py install
 ---> Running in 80f8e409519f
Collecting pip
  Downloading https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl (1.5MB)
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/82/2f/ef7afd98530d07c89deffec833b4b1a91a27a5db6d9f1a216599f5f0316e/setuptools-51.1.2.tar.gz (2.1MB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "setuptools/__init__.py", line 16, in <module>
        import setuptools.version
      File "setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "pkg_resources/__init__.py", line 1365
        raise SyntaxError(e) from e
                                ^
    SyntaxError: invalid syntax

After this fix docker-build works:

docker build -t review-rot:latest .
...
Successfully tagged review-rot:latest

docker run --rm -it review-rot:latest bash
review-rot --help
...

The container can't be built with python2 anymore, so we might as well
switch to the python3 packages fully.
@adrian-marza-mambu
Copy link
Author

@pbortlov @danrodrig @ralphbean PTAL if you get a chance

@danrodrig
Copy link
Contributor

@adrian-marza-mambu I didn't look into this project since quite a while and I never used the container image. However, I did a quick check. I built and run the image with Podman and I was able to check some reviews, LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants