We have answer of your question!

100% solved queries, no empty question

Question: What's the best way to distribute python command-line tools?


0

My current setup.py script works okay, but it installs tvnamer.py (the tool) as "tvnamer.py" into site-packages or somewhere similar..

Can I make setup.py install tvnamer.py as tvnamer, and/or is there a better way of installing command-line applications?

Question author Dbr | Source

Answer


1


Try the entry_points.console_scripts parameter in the setup() call. As described in the setuptools docs, this should do what I think you want.

To reproduce here:

from setuptools import setup

setup(
    # other arguments here...
    entry_points = {
        'console_scripts': [
            'foo = package.module:func',
            'bar = othermodule:somefunc',
        ],
    }
)
Answer author Blair-conrad

Tickanswer.com is providing the only single recommended solution of the question What's the best way to distribute python command-line tools? under the categories i.e python , command-line , packaging , . Our team of experts filter the best solution for you.


You may also add your answer

Thanks for contributing an answer to Tick Answer!