txStatsD doesn't install with pip

Bug #1167020 reported by Kevin McDonald
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
txStatsD
New
Undecided
Unassigned

Bug Description

This error happens when trying to install with pip:

pip install txstatsd -U
Downloading/unpacking txstatsd
  Downloading txStatsD-1.0.0.tar.gz (51kB): 51kB downloaded
  Running setup.py egg_info for package txstatsd

    package init file 'twisted/plugins/__init__.py' not found (or not a regular file)
Installing collected packages: txstatsd
  Running setup.py install for txstatsd
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: option --single-version-externally-managed not recognized
    Complete output from command /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/var/folders/sr/c63gdn497h99hwk3q6y17v5h0000gn/T/pip-build/txstatsd/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/sr/c63gdn497h99hwk3q6y17v5h0000gn/T/pip-Db9xm1-record/install-record.txt --single-version-externally-managed:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

   or: -c --help [cmd1 cmd2 ...]

   or: -c --help-commands

   or: -c cmd --help

error: option --single-version-externally-managed not recognized

----------------------------------------
Command /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/var/folders/sr/c63gdn497h99hwk3q6y17v5h0000gn/T/pip-build/txstatsd/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/sr/c63gdn497h99hwk3q6y17v5h0000gn/T/pip-Db9xm1-record/install-record.txt --single-version-externally-managed failed with error code 1 in /var/folders/sr/c63gdn497h99hwk3q6y17v5h0000gn/T/pip-build/txstatsd
Storing complete log in /Users/kevin/.pip/pip.log

It looks like the issue is with overriding the command class for install: https://groups.google.com/forum/?fromgroups=#!topic/python-virtualenv/OYClg6j5cE4

When faced with this issue, I used the technique in this SO answer to populate the dropin cache: http://stackoverflow.com/a/7525163/74375

Tags: pip
Revision history for this message
Hynek Schlawack (hyneks) wrote :

The problem at hand is that the setup.py mixes distutils (the install command) and setup tools (the rest). pip deduces correctly that the setup tools setup function is called and passes setup tools parameters to it although the *install* command itself is still from distutils.

There are three possible solutions:

- Stop supporting distutils altogether (my favorite option, it’s close to 2014 after all).
- Use consistently distutils by ripping out the try: import block.
- Use the proper way for expanding setuptools by using its install command for cache rebuilding.

If you tell me which one you prefer and would consider a fairly soonish release, I’m happy to contribute code. As it stands right now, I’d have to write my own txstatsd client which I’d find rather unfortunate and would prefer to spend my time at fixing what’s there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.