开发者

Installing with pip breaks on python setup.py egg_info

I'm trying to install my own program via Pip and the PyPI with the usual command pip install tvrenamr however I'm getting the error below:

Downloading/unpacking tvrenamr
  Running setup.py egg_info for package tvrenamr
    Usage: tvr [options] <file/folder>

    -c: error: no such option: --egg-base
    Complete output from command python setup.py egg_info:
    Usage: tvr [options] <file/folder>



-c: error: no such option: --egg-base

----------------------------------------
Command python setup.py egg_info failed with error code 2
Storing complete log in /Users/george/.pip/pip.log

It's been a while since I checked but I used to be able to pip install my code with the previous versions I put on the PyPI, however I updated to the latest Pip - not sure if would cause things to break or not!

So when pip is running python setup.py egg_info it seems that TvRenamr is being called, or at least my option parser class has been imported.

My setup.py:

from os.path import dirname, join
from setuptools import setup, find_packages

from tvrenamr import get_version

def fread(fname):
    return open(join(dirname(__file__), fname)).read()

set开发者_开发问答up(
    name = 'tvrenamr',
    version = get_version(),
    description = 'Rename tv show files using online databases',
    long_description = fread('README.markdown'),
    author = 'George Hickman',
    author_email = 'george@ghickman.co.uk',
    url = 'http://github.com/ghickman/tvrenamr',
    license = 'MIT',
    packages = find_packages(exclude=['tests']),
    entry_points = {'console_scripts': ['tvr = tvrenamr.tvrenamr:run',],},
    classifiers = [
        'Environment :: Console',
        'Intended Audience :: End Users/Desktop',
        'License :: OSI Approved :: MIT License',
        'Operating System :: MacOS',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 2.6',
        'Topic :: Multimedia',
        'Topic :: Utilities',
        'Natural Language :: English'],
    install_requires = ('lxml', 'pyyaml',)
)

tvrenamr/__init__.py:

__version__ = (3, 0, 0)

def get_version():
    return '.'.join(map(str, __version__))

My only thoughts on how it's getting tvrenamr's options now are that either find_packages or the entry_points option are in some way importing tvrenamr.py and thus options.py??

All versions of TvRenamr were uploaded to the PyPI with python setup.py sdist upload.

I really am stumped with this problem - any help much appreciated!

EDIT: I can run python setup.py egg_info with no errors.


Unfortunately this was a case of setup tools masking an error in the setup.py that was being caused by a bad version string in tvrenamr/__init__.py.

I picked up on the error after installing manually with python setup.py install into a clean virtualenv so something in my environment must have been affecting things before too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜