[Biopython-dev] NumPy dialog when Biopython installed from automated programs

Eric Talevich eric.talevich at gmail.com
Thu Oct 13 18:00:22 UTC 2011


On Thu, Oct 13, 2011 at 10:05 AM, Brad Chapman <chapmanb at 50mail.com> wrote:

>
> Hi all;
> Biopython's setup.py currently has an interactive question/answer
> session to remind users to optionally install NumPy if it's not
> present. This is useful for by-hand installations, but problematic with
> automated installers.
>
> One useful feature of setuptools is the 'install_requires' attribute in
> setup.py. This allows your programs to define the requirements and have
> them automatically installed from PyPi. It's a great way to include
> useful libraries without having to fret excessively about users
> installing dependencies.
>
> Unfortunately if you use install_requires with Biopython, and NumPy is
> not installed, automated scripts will get stuck in the question/answer
> dialog. To resolve this issue, I wrote a small patch that adds NumPy to
> Biopython's install_requires and skips the Q/A only in cases where it is
> installed via pip or easy_install:
>
>
> https://github.com/chapmanb/biopython/commit/be53d850d721fc82af81bedcd9fb9034b0a2099b
>
> If someone is able to review this, it would be great to get it into
> Biopython for the next release.
>
>
Hi Brad,

Looks cool to me, except the sys.argv parsing gets a little gritty
(understandably):

Line 115:

    if dist_dir.find("egg-dist-tmp") >= 0:

Could this be `if 'egg-dist-tmp' in dist_dir`?


Line 118:

    if sys.argv in [["-c", "develop", "--no-deps"],
                    ["-c", "egg_info"]]:

Does pip allow rearranging arguments? Would `--no-deps -c develop` also be
valid?
If so, should that be added as a third item in the list-of-args?


-Eric



More information about the Biopython-dev mailing list