2008-08-20 7 views

답변

33

setup() 호출에서 entry_points.console_scripts 매개 변수를 사용해보십시오. setuptools docs에 설명 된대로, 이것은 내가 원하는 것이라고 생각합니다.

여기 재현하려면 :이 파이썬 2.6 및 3.1하려고하면

from setuptools import setup 

setup(
    # other arguments here... 
    entry_points = { 
     'console_scripts': [ 
      'foo = package.module:func', 
      'bar = othermodule:somefunc', 
     ], 
    } 
) 
+7

, 나는이 메시지가'UserWarning : 알 수없는 분배 옵션 'entry_points''합니다. 그래서 파이썬 2.6과 3.1에서 제공되는'distutils '에서는 지원되지 않는다고 생각합니다. PyPI를 배포하려면이 옵션을 사용하는 것이 좋습니다. Ubuntu 11.04에 –

+5

을 설치하려면 python-setuptools를 설치하십시오. setup.py가 다음을 가져 오는지 확인하십시오. 'from setuptools import setup' – cmcginty

관련 문제