Skip to content

How to specify the constraints file for a test? #3074

Discussion options

You must be logged in to vote

install_command is the answer. Using constrain_package_deps or use_frozen_constraints was barking up the wrong tree. It wasn't explicit in the documentation, but this is applied to both dep and package installs. If using this in tox.ini, this will work:

install_command =
    python -I -m pip install {opts} {packages} -c my_constraints.txt

The only thing that would be one better would be being able to have separate install commands for deps and package installs (so they can get their own constraints). Perhaps a feature request.

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@brendan-morin
Comment options

@brendan-morin
Comment options

@brendan-morin
Comment options

@brendan-morin
Comment options

Answer selected by brendan-morin
@gaborbernat
Comment options

@brendan-morin
Comment options

@gaborbernat
Comment options

@brendan-morin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants