deephaven / deephaven-docs-community

Source code for Community docs on the deephaven.io website.
Apache License 2.0
0 stars 5 forks source link

System set-up & admin: Python deployment using setuptools #163

Open chipkent opened 5 months ago

chipkent commented 5 months ago

DH can be installed using pip. This can be used to create scripts that run on the command line. Additionally, python setuptools provides a way to create and install scripts from whl archives. Combining these two, it is possible to create a python package using DH that contains scripts that get installed as programs available to users.

This is done in setup.py with code that looks like:

setup(
    ...
    entry_points = {
        'console_scripts': ['funniest-joke=funniest.command_line:main'],
    }
    ...
)

See for example https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html.