您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

分发python命令行工具的最佳方法是什么?

分发python命令行工具的最佳方法是什么?

尝试entry_points.console_scripts在setup()调用中使用参数。如setuptools docs中所述,这应该可以完成我认为想要的操作。

要在此处复制:

from setuptools import setup

setup(
    # other arguments here...
    entry_points = {
        'console_scripts': [
            'foo = package.module:func',
            'bar = othermodule:somefunc',
        ],
    }
)
python 2022/1/1 18:38:28 有335人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶