Need a way to install a requirement before other requirements

Issue #339 on hold
Glen Nelson created an issue

I have mock 1.3.0 as a requirement for my project. Also, due to various reasons (corporate) I cannot upgrade to a version of virtualenv with setuptools 17.1, which mock requires. as such, I want to install setuptools 17.1 before everything else.

There does not seem to be a way to do this.

Comments (3)

  1. Aleks Bunin

    I had similar issue, and I worked this out with the custom script, which I use with install_command command.
    Add this to your tox.ini:

    install_command=./ {opts} {packages}

    then save this to your

    #!/usr/bin/env bash
    if [[ $@ == *"mock=="* ]]; then
        pip install -U setuptools==17.1
    exec ${VIRTUAL_ENV}/bin/pip install  $*

    If that's not an option, try adding "setuptools==17.1" to the top of your deps=, but that might not work...

  2. Log in to comment