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

shellcheck-py installation fails using pip 20.0.1 #1803

Closed
fdegir opened this issue Jan 21, 2020 · 3 comments
Closed

shellcheck-py installation fails using pip 20.0.1 #1803

fdegir opened this issue Jan 21, 2020 · 3 comments

Comments

@fdegir
Copy link

fdegir commented Jan 21, 2020

When installing shellcheck-py, we started hitting installation errors.
Here is the details of the environment, python, pip, and shellcheck-py versions.

OS: Ubuntu1804
python: 3.5.3
pip version: 20.0.1
shellcheck-py: 0.7.0.1
requirements file: https://gerrit.nordix.org/gitweb?p=infra/engine.git;a=blob;f=test-requirements.txt

Here is the snippet that shows the problem.

pip install -r test-requirements.txt
Requirement already satisfied: pip==20.0.1 in ./.venv/lib/python3.5/site-packages (from -r test-requirements.txt (line 7)) (20.0.1)
Collecting tox==3.14.3
  Using cached tox-3.14.3-py2.py3-none-any.whl (80 kB)
Collecting ansible-lint==4.1.0
  Using cached ansible_lint-4.1.0-py2.py3-none-any.whl (54 kB)
Collecting yamllint==1.19.0
  Using cached yamllint-1.19.0-py2.py3-none-any.whl (57 kB)
Collecting shellcheck-py==0.7.0.1
  Using cached shellcheck_py-0.7.0.1.tar.gz (3.2 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/jenkins/nordix/slave_root/engine/.venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hu6_3hl8/shellcheck-py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-hu6_3hl8/shellcheck-py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-hu6_3hl8/shellcheck-py/pip-egg-info
         cwd: /tmp/pip-install-hu6_3hl8/shellcheck-py/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-hu6_3hl8/shellcheck-py/setup.py", line 31
        return f'shellcheck-v{SHELLCHECK_VERSION}.{get_arch()}'
                                                              ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

To reproduce the issue

virtualenv -p python3 .venv
source .venv/bin/activate
pip install shellcheck-py==0.7.0.1

This could be related to what's going on with pip as virtualenv pulls in pip 20.0.1 and things seem to be shaky. [0][1][2]
Installing shellcheck-py using an earlier pip version (19.0.3) works.

pip install pip==19.0.3 --force-reinstall
Collecting pip==19.0.3
  Using cached pip-19.0.3-py2.py3-none-any.whl (1.4 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.1
    Uninstalling pip-20.0.1:
      Successfully uninstalled pip-20.0.1
Successfully installed pip-19.0.3
(.venv) jenkins@5810e48a14c2:~/nordix/slave_root/engine$ pip install shellcheck-py==0.7.0.1
Collecting shellcheck-py==0.7.0.1
  Using cached https://files.pythonhosted.org/packages/ea/d6/e3d1fc934774d5f2d2fd76484baa3bbb4f3172aa9eccff1a6d5bcc405c90/shellcheck_py-0.7.0.1-py2.py3-none-manylinux1_x86_64.whl
Installing collected packages: shellcheck-py
Successfully installed shellcheck-py-0.7.0.1
You are using pip version 19.0.3, however version 20.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

[0] pypa/pip#7621
[1] pypa/pip#7620
[2] pypa/pip#7624

@webknjaz
Copy link

@fdegir this is not related to the Pip issue. Your first log clearly shows that their setup.py script has f-strings which only work under Python 3.6+.

The second snippet shows that it uses a pre-cached wheel and doesn't download/select sdist from PyPI.

@fdegir
Copy link
Author

fdegir commented Jan 21, 2020

thanks for the pointer @webknjaz. it works with python 3.6 as you said which I should have looked more carefully.

@fdegir fdegir closed this as completed Jan 21, 2020
@webknjaz
Copy link

webknjaz commented Jan 21, 2020

FWIW Pip seems to be also broken after all: pypa/pip#7626

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

No branches or pull requests

2 participants