[TIP] Dynamic vs defined dependency installation using pip.

Jorge Vargas jorge.vargas at gmail.com
Thu Jan 20 21:03:35 PST 2011

Hi Jason,

I see two things in your statement that i'm not entirely sure I undestood.

You said that the dependencies are mostly internal packages ? and that
you are installing them from SVN? in that case if you do not specify
the REV it will always try the HEAD. So you can easily depend on the
lastest if you remove the revision part.

Second you said that some packages will depend on other's
requirements.txt A little know feature is that you can include other
files. For example this is our hudson/production setup. For one of my

$ cat test-requirements.txt
-r requirements.txt

so we define all our dependencies in requirements.txt and the
test-only deps on test-requirements.txt You could do something similar
if you could figure out the path to another project in your
requirements. I haven't try that but I assume something like
../../requirements.txt will work as well as Full paths.

I also agree with Matt Harrison and having too loose dependencies may
introduce unexpected bugs. Personally we pin down to the SVN revision
all our internal projects and part of our release process is to commit
to the requirements.txt the updated revisions of dependent projects.
It's annoying yes but it will help you not break your production box
if a new incompatible version of the package is released right after
your tests but before your final deploy.


On Thu, Jan 20, 2011 at 11:53 PM, AWeber - Jason Schadel
<jasons at aweber.com> wrote:
> I recently started using pip, virtualenv and hudson to continuously integrate some python packages.  I'm utilizing the requirement file feature of pip to define the requirements of the package contained in our svn repos that need installed in the virtualenv.  Some see it as a hassle to define all the requirements for a particular package and would rather have pip be able to dynamically determine what packages are needed based on the other pip requirement files in the other packages.
> I agree with the recommendation of the pip docs of listing all the bindings but wanted to get the opinion of the Python Testing community on whether using a defined list of dependencies is better than a dynamically created list  when testing.
> Jason Schadel
> AWeber Communications, Inc.
> http://www.aweber.com
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list