question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global completion doesn't work for packages installed from wheels

See original GitHub issue

pytest has its command line scripts installed via setuptools.setup(entry_points={‘console_scripts’: …}) construction. If I understand correctly, argcomplete’s global completion should handle this case and work just fine in such a situation, but it doesn’t. Looks like this if statement should cover such a case, but pytest script created after installation doesn’t have any of these strings in it. Here is the full content of pytest script from my environment:

#!/Users/pavel/.pyenv/versions/3.6.1/envs/test_env/bin/python3.6

# -*- coding: utf-8 -*-
import re
import sys

from pytest import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

pytest module from which main function is imported has # PYTHON_ARGCOMPLETE_OK as its first string.

I’ve opened a ticket in pytest project (see https://github.com/pytest-dev/pytest/issues/2725), but it looks like that this is a problem of argcomplete.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
mbdevplcommented, May 24, 2019

FYI: In upstream issue https://github.com/pypa/pip/issues/4702 the consensus is that they will not do anything about it. And the solution in PR #241 is working for me after rebasing onto current master.

1reaction
pavelradcommented, Sep 1, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not build wheels since package wheel is not installed
You need to install the wheel package, like this: pip install wheel.
Read more >
All packages that contain non-package data are now likely ...
0 sdist are converted to wheels before being installed. As a result, a package is never setup.py install'ed but always bdist_wheel'ed first.
Read more >
What Are Python Wheels and Why Should You Care?
In this tutorial, you'll learn what Python wheels are and why you should care as both a developer and end user of Python...
Read more >
Python Package Installation on Windows
Python packages installed with pip on Windows are typically bundled into 'wheels' prior to installation. A wheel is a zip-style archive that ...
Read more >
Installing Packages - Python Packaging User Guide - Python.org
Do not run any of the commands in this tutorial with sudo : if you get a ... Also, what if you can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found