[TIP] Tox & setup.py install_requires

Randy Syring randy at thesyrings.us
Sat Feb 28 19:17:06 PST 2015


Holger,

I currently specify our development dependencies like this:

    develop_requires = [
         'mock',
         'nose',
         'xlwt',
         'xlrd',
         'docutils',
         'sqlalchemy',
    ]

    setup(
         name="BlazeUtils",
    #...<snip>...
         extras_require={'develop': develop_requires},
         install_requires=['wrapt'],
    )


I like this because you can `pip install -e .[development]` and don't 
need any extra pip requirements files.

So that was the reason for my question.  I would like to specify the 
dependencies only once in my project.  Right now, I'm just setting the 
above pip command as part of the "commands" setting in the config file.  
It works, but not sure if it's the best solution.

*Randy Syring*
Husband | Father | Redeemed Sinner

/"For what does it profit a man to gain the whole world
and forfeit his soul?" (Mark 8:36 ESV)/

On 02/27/2015 09:36 AM, holger krekel wrote:
> On Wed, Feb 25, 2015 at 18:53 -0500, Randy Syring wrote:
>> Can tox be configured to install dependencies based on what is
>> listed in setup.py `install_requires` and `extras_require`?
>>
>> Thanks.
> Not sure if i understand correctly but tox.ini provides no means
> to reference those metadata entries.  If you let tox install
> your package this will install the ``install_requires`` dependencies,
> however.  What's the issue you are having?
>
> holger
>
>
>> *Randy Syring*
>> Husband | Father | Redeemed Sinner
>>
>> /"For what does it profit a man to gain the whole world
>> and forfeit his soul?" (Mark 8:36 ESV)/
>>
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20150228/3a5bcb4a/attachment.htm>


More information about the testing-in-python mailing list