1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #351 new

Distribute install switches to backwards-compatiblity mode when install command is subclassed

David D Lowe
created an issue

The issue arises because of these lines of code:

https://bitbucket.org/tarek/distribute/src/a286137eb40d24d5df0655c0c4ca40d6576a10a5/setuptools/command/install.py?at=default#cl-50

The code automatically switches to backwards-compatibility mode (without warning) when the caller stack doesn't match the expected stack.

At the very least, a message should be logged informing the user that backwards-compatibility mode has been enabled.

Preferably, the mechanism used to detect this should be improved, it fails this use-case:

from setuptools import setup
import setuptools

class custom_install(setuptools.command.install.install):
    def run(self):
        setuptools.command.install.install.run(self)
        # add code here

setup(
    # ...
    cmdclass={'install' : custom_install},
)

Comments (0)

  1. Log in to comment