2012-10-07 13 views
8

एक अजगर पैकेज बनाने की कोशिश कर रहा है। काम करने लगता है, लेकिन मुझे एक चेतावनी मिलती है। मेरी setup.py है:पायथन पैकेजिंग

#! /usr/bin/env python 

from distutils.core import setup 

setup(
    name='myPKG', 
    version='0.02.01', 
    url='http://someURL.02.01', 
    packages=['scripts', 
       'statistics'], 
    author = 'Research-Team', 
    author_email = '[email protected]', 
    description='This is my package', 
    scripts=['scripts/myScript.py'], 
    entry_points={'console_scripts' : ['myCommandlineName = scripts.myScript:testRequireDecorator']}, 
    install_requires=['numpy >= 1.5.1', 'scipy >= 0.9.0', 'poster'] 
) 

मैं निम्नलिखित चेतावनी मिलता है। क्यों, विशेष रूप से, दो पहली उपयोगकर्ता चेतावनी?

[email protected]: python setup.py sdist 
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points' 
    warnings.warn(msg) 
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' 
    warnings.warn(msg) 
running sdist 
running check 
package init file 'scripts/__init__.py' not found (or not a regular file) 
reading manifest template 'MANIFEST.in' 
no previously-included directories found matching '.git' 
warning: no previously-included files matching '*.pyc' found under directory '.' 
writing manifest file 'MANIFEST' 
creating myPKG-0.02.01 
creating myPKG-0.02.01/scripts 
creating myPKG-0.02.01/statistics 
making hard links in myPKG-0.02.01... 
hard linking README -> myPKG-0.02.01 
hard linking setup.py -> myPKG-0.02.01 
hard linking scripts/myScript.py -> myPKG-0.02.01/scripts 
hard linking statistics/RunningMedian.py -> myPKG-0.02.01/statistics 
hard linking statistics/RunningStdev.py -> myPKG-0.02.01/statistics 
hard linking statistics/__init__.py -> myPKG-0.02.01/statistics 
Creating tar archive 
removing 'myPKG-0.02.01' (and everything under it) 
+1

http://stackoverflow.com/questions/8295644/pypi-userwarning-unknown-distribution-option-install-requires (के लिए गूगल पर पहला परिणाम 'UserWarning: अज्ञात वितरण विकल्प') –

उत्तर

24

आप distutils उपयोग कर रहे हैं, लेकिन आप उन विकल्पों का उपयोग करने के लिए कम से कम setuptools की जरूरत है।

from setuptools import setup 
संबंधित मुद्दे