2014-04-03 138 views
0

安装时,我自己包的时候我就想不通错误。创建PIP封装。错误安装

我从创建包:

Mapp/ 
    CHANGES.txt 
    LICENSE.txt 
    MANIFEST.in 
    README.txt 
    setup.py 
    mapp/ 
     __init__.py 
     core/ 
      __init__.py 
      ... 
     utils/ 
      __init__.py 
      ... 

然后我运行:

python setup.py sdist 

输出是:

running sdist 
running egg_info 
creating Mapp-0.1.0 (and lots of creatin) ... 
making hard links in Mapp-0.1.0... 
'' not a regular file -- skipping 
hard linking CHANGES.txt -> Mapp-0.1.0 (and lots of linking) ... 
Writing Mapp-0.1.0/setup.cfg 
creating dist 
Creating tar archive 
removing 'Mapp-0.1.0' (and everything under it) 

然后我会执行:

sudo python setup.py install 

和输出是:

Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ 
/usr/bin/python -E -c pass 
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files 
running bdist_egg 
running egg_info 
writing Mapp.egg-info/PKG-INFO 
writing top-level names to Mapp.egg-info/top_level.txt 
writing dependency_links to Mapp.egg-info/dependency_links.txt 
reading manifest template 'MANIFEST.in' 
writing manifest file 'Mapp.egg-info/SOURCES.txt' 
installing library code to build/bdist.linux-i686/egg 
running install_lib 
running build_py 
creating build 
creating build/lib.linux-i686-2.7 
creating build/lib.linux-i686-2.7/mapp 
copying mapp/__init__.py -> build/lib.linux-i686-2.7/mapp (and lots of copying) 
byte-compiling build/bdist.linux-i686/egg/mapp/dataset/files.py to files.pyc (and lots of compiling) 
creating build/bdist.linux-i686/egg/EGG-INFO 
installing scripts to build/bdist.linux-i686/egg/EGG-INFO/scripts 
running install_scripts 
running build_scripts 
creating build/scripts-2.7 
error: file '/home/user/workspace/Mapp' does not exist 

但奇怪的是/ home/user中/工作区/马普存在,但它不是文件夹的文件。

请我试图解决这一天,现在我不知道该怎么办。谢谢。

setup.py

from setuptools import setup, find_packages 

setup(
    name='Mapp', 
    version='0.1.0', 
    author='Ondrej Pelikan', 
    author_email='[email protected]', 
    packages=find_packages(exclude=['tests*']), 
    scripts=[''], 
    url='http://pypi.python.org/pypi/Mapp/', 
    license='LICENSE.txt', 
    description='Package for simplify MAPP prediction analysis workflow.', 
    long_description=open('README.txt').read(), 
    classifiers=[ 
     'Development Status :: 5 - Production/Stable', 
     'Intended Audience :: Developers', 
     'Natural Language :: English', 
     'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', 
     'Operating System :: OS Independent', 
     'Programming Language :: Python', 
     'Programming Language :: Python :: 2', 
     'Programming Language :: Python :: 2.6', 
     'Programming Language :: Python :: 2.7', 
     'Topic :: Software Development :: Libraries :: Python Modules', 
    ], 
) 

MANIFEST.IN

include *.txt 
recursive-include mapp *.py 

回答

0

我想通了!问题原因:

scripts=[''], 

不能有空列表。这行必须删除!然后它的作品!