<div dir="ltr"><div class="gmail_default" style="font-family:monospace">Dear biopython devs,<br><br></div><div class="gmail_default" style="font-family:monospace">I recently implemented in MDAnalysis a distutils/setuptools workaround (<a href="https://github.com/MDAnalysis/mdanalysis/pull/499">https://github.com/MDAnalysis/mdanalysis/pull/499</a>) to the numpy dependency-at-setuptime problem, and I think biopython might benefit from it.<br><br></div><div class="gmail_default" style="font-family:monospace">The problem is that in setup.py distutils&#39; setup() must be provided a list of Extension objects, which in turn must contain the list of directories in which to look for include files (namely, numpy&#39;s).<br><br>If numpy isn&#39;t installed the Extensions objects can&#39;t be instantiated. If numpy is specified as a setup-time dependency it will get installed when setup() is called, but the instantiation of the Extensions happens before the call to setup(). We get a cyclic dependency in that we need to know the path to the numpy install before calling the function that will install numpy.<br><br></div><div class="gmail_default" style="font-family:monospace">My solution was to subclass Extension to have a managed include_dirs attribute which only probes for numpy at install-time. Since by then setup() has had time to install numpy, all works fine.<br><br></div><div class="gmail_default" style="font-family:monospace">I believe a similar workaround could work well for biopython (although it might involve setting numpy as as hard requirement, or at least asking the user beforehand whether to install it).<br><br>Of course, it would also benefit us at MDAnalysis since we could then cleanly depend on biopython without worrying whether its install is numpy-complete or not.<br><br></div><div class="gmail_default" style="font-family:monospace">I&#39;ll be glad with helping with the implementation, if you think it&#39;s worthy.<br></div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">Cheers,<br></div><div class="gmail_default" style="font-family:monospace">Manel<br></div><div class="gmail_default" style="font-family:monospace"></div></div>