I’ve got a couple packages in PyPI, and I’d like to include autocompletion features with both of them. How would you check that Bash autocompletion should be installed at all (check for /etc/bash_completion, maybe?), and how would you install it with setup.py (preferably using setuptools)?
I’ve got a couple packages in PyPI , and I’d like to include autocompletion
Share
If you’re going to require OS-level packages (i.e.
bash-completion), then you should distribute your library as an OS-level package. That is, in.deb,.rpm, etc. Some tips here:As part of the package generation, you can call your
setuptoolsscript to install the Python code. To ensurebash-completionis installed, you can specify it is a required package.