[TIP] Tox & setup.py install_requires
holger krekel
holger at merlinux.eu
Mon Mar 2 23:38:05 PST 2015
Randy,
i sympathize with the idea that dependencies are only specified once.
As for your setup, i usually use "setup.py" as specifying the
core dependencies and tox for specifying test, development
dependencies and then use "tox --develop" to avoid re-installing
things.
I was sometimes thinking that introducing "--inline=env" or "-iENV"
for installing a particular test-environment's deps into the current
environment where tox is invoked from makes sense. Maybe also a
"--venv-target" so that you can separate the installation of tox
itself from your development environment.
best,
holger
On Sat, Feb 28, 2015 at 22:17 -0500, Randy Syring wrote:
> 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
> >
>
--
about me: http://holgerkrekel.net/about-me/
contracting: http://merlinux.eu
More information about the testing-in-python
mailing list