Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Peep doesn't support -rrequirements.txt #63

Open
magopian opened this issue Dec 11, 2014 · 1 comment
Open

Peep doesn't support -rrequirements.txt #63

magopian opened this issue Dec 11, 2014 · 1 comment

Comments

@magopian
Copy link

The usual way to use a different install command for dependencies in tox is to use the install_command setting.

Here's an example (it needs the peep.pyscript available):

[testenv:tests]
install_command = {toxinidir}/bin/peep.py install {opts} {packages}
deps =
    -rrequirements.txt

However, peep doesn't accept passing the requirements file this way (it needs a space between the two: -r requirements.txt. Pip does accept this though.

If you were to add this space, to have peep accept it, then it would be tox's turn to fail, calling the following command: (notice there is only one parameter for '-r requirements.txt', instead of two like '-r', 'requirements.txt'):
cmdargs=['/Users/mathieu/test_sugardough/bin/peep.py', 'install', '-r requirements.txt']

From a discussion in irc with @erikrose and @jezdez, we found out that a custom arg parser was coded for peep (due to optparse's decision to explode when it encounters unfamiliar options), but that might not be needed if using the same trick as the following code: https://github.com/django/django/blob/stable/1.4.x/django/core/management/__init__.py#L152-L204

The workaround for the time being is to simply not use the install_command nor the deps, but install the dependencies in the commands:

commands = 
    peep.py install -r requirements.txt
    # test command

This is only partially the problem with using peep together with tox, please see #62

@erikrose
Copy link
Owner

I think we should fix this one, stealing the custom parser subclass from Django.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants