如何在 python 中指定可选依赖项setup.py
?
这是我为我的开源库指定可选依赖项的尝试,但它似乎并没有做太多。
https://github.com/od-eon/django-cherrypy/blob/master/setup.py
特别extra_requires
是在这个片段中:
setup(
name='django-cherrypy',
version='0.1',
packages=packages,
license='LICENSE',
description='cherrypy, running under django',
long_description=open('README.md').read(),
author='Calvin Cheng',
author_email='calvin@calvinx.com',
install_requires=['cherrypy-wsgiserver'],
extra_requires=['newrelic'],
url='https://github.com/od-eon/django-cherrypy',
)
建议?