pythonpipsetup.pypypi

Why my package can't be installed with "pipx"?


I've got a Python project aws-ssm-tools that uses setup.py for packaging. It comes with 3 scripts: ssm-tunnel, ssm-session and ssm-copy.

It can be installed with pip install aws-ssm-tools and puts the scripts to ~/.local/bin/.

However when I try to install it with pipx it fails:

~ $ pipx install aws-ssm-tools

No apps associated with package aws-ssm-tools. Try again with '--include-deps' 
to include apps of dependent packages, which are listed above. If you are 
attempting to install a library, pipx should not be used. Consider using pip or 
a similar tool instead.

I have the scripts specified in setup.py:

SCRIPTS = [
    'ssm-session',
    'ssm-copy',
    'ssm-tunnel',
    'ssm-tunnel-updown.dns-example',
]

# ...

setup(
    name="aws-ssm-tools",
    version=VERSION,
    packages=find_packages(),
    scripts=SCRIPTS+[
        'ssm-tunnel-agent'
    ],
    # ...
)

What else do I have to do to make pipx happy?


Solution

  • As stated in the pipx documentation chapter "How pipx works", section "Developing for pix", the project requires setuptools entry_points.

    According to the content of your question, it seems that the target project uses scripts, they are similar in purpose to entry-points but pipx does not look for those and does not expose them.