pallets / click

Python composable command line interface toolkit
https://click.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
15.83k stars 1.4k forks source link

Paver Support #297

Closed nfarrar closed 9 years ago

nfarrar commented 9 years ago

I was looking for a pure-python alternative to my makefile (which does some system-level initialization necessary for the package), and stumbled across paver. It wraps setuptools and offers makefile style syntax in setup.py.

I attempted to try it out with click (just to see if it would work) by this setup.py (which works with setuptools):

from paver.easy import *
from paver.setuputils import setup, find_packages

setup(
    name = "crib",
    version = "0.0.1",
    description = "testing.",
    packages = find_packages(),
    include_package_data=True,
    install_requires=[
        'Click',
    ],
    entry_points='''
        [console_scripts]
    crib=crib.bootstrap:cli
    ''',

... and installing in the virtual environment with:

python setup.py develop

Which (when used with regular setuptools) makes the crib command available in the virtual environment and runs correctly.

While running this with paver didn't generate any errors, attempting to run my command generates a whole slew of errors - and python setup.py develop -u won't uninstall the command that was installed.

Googling around for python click paver, I'm not finding any information - and searching both click in the paver repo and paver in the click repo turn up nothing.

So - just curious, should this work? If not, any chance support might happen in the future?

jhermann commented 9 years ago

Don't have a solution for you, but an alternative…

I switched from Paver to Invoke, for the very reason it wraps and takes over setuptools – this just breaks too often, and paver-minilib is a general pain. See http://springerle.github.io/py-generic-project/ for a fully integrated example, including a Click __main__ stub.

untitaker commented 9 years ago

Could you post the slew of errors you're getting?

Since alternatives allegedly work, I strongly suspect this to be a paver issue though.

mitsuhiko commented 9 years ago

Out of the scope for this, if you care about that, I would propose to create a separate package.