Issues

Issue #122 new

sitepackages=True inhibits console_scripts entry points

Barry Warsaw
created an issue

In bzr branch lp:ubuntu-system-image/client I have two console_scripts in the setup.py's entry_points. One creates system-image-cli and the other creates system-image-dbus. My tox.ini has

[testenv]
commands = python setup.py nosetests
sitepackages=True

This is because at build-time (both for local testing and during Ubuntu package build) we do not want any dependencies downloaded from PyPI. Everything must come from an installed package.

However, if the Ubuntu packages system-image-cli and system-image-dbus are installed (which provide the /usr/bin scripts of the same name), then tox --notest -r will not install the console_scripts into the tox environment, and this breaks the tests.

This problem may be related to https://bitbucket.org/hpk42/tox/issue/80/package-cant-be-imported-when-sitepackages but I'm not sure.

Comments (2)

  1. Barry Warsaw reporter
    % sudo apt-get install system-image-cli  system-image-dbus
    [...system installs these packages...]
    % tox --notest -r
    [...]
    % ls .tox/py33/bin/
    activate       activate_this.py   pip*      python3@
    activate.csh   easy_install*      pip-3.3*  python3.3*
    activate.fish  easy_install-3.3*  python@
    % bzr clean
    .tox
    system_image.egg-info
    Are you sure you wish to delete these? ([y]es, [n]o): yes
    deleting paths:
    % sudo apt-get purge system-image-cli system-image-dbus system-image-common
    [...system uninstalls these packages...]
    % tox --notest -r
    [...]
    % ls .tox/py33/bin/
    activate      easy_install*      python@        system-image-dbus*
    activate.csh      easy_install-3.3*  python3@
    activate.fish     pip*           python3.3*
    activate_this.py  pip-3.3*       system-image-cli*
    
  2. Log in to comment