[BioPython] Plans for release 0.95d01

Brad Chapman chapmanb@arches.uga.edu
Thu, 1 Feb 2001 18:25:23 -0500 (EST)


--fAZXZ1G0sy
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit

Jeff:
> it's time to roll a new release. 

Sounds good!

> Stuff left to do:
[...]
> - Figure out how to deal with dependencies.  We've been accumulating
> dependencies on external packages, i.e. Martel, mxTextTools (through
> Martel), Numeric, and Spark.  Brad suggested writing code that will help
> install those packages.  Are you planning on doing that for this
> release?

I don't know -- I've kind of had misgivings about trying to write a
hackish install package -- it might just make life harder for people,
especially people like Johann who are trying to package Biopython for
their platforms. If Martel is included in the Biopython tree (what was 
the final word on this? Andrew?) then I think we should install it,
but for other external tools, I'm kind of nervous about this. What do
you guys think?

> If not, I propose 1) adding Spark since it's only 1 file, 

I've already done this (using my time machine :-) -- it's in
Bio.Tools.Parsers

> 2) making
> setup.py check for those packages, and if they don't exist, complain and
> ask the user if they want to continue anyway.

How about just writing out a warning at the end of the install?
Attached is a modified setup.py script which does this -- what do
people think about this plan for now, and see how it goes? If you like 
it, I can check it, or something like it, into CVS. It is pretty
simple minded, but it might work okay.

> - Brad, let me know when your GenBank stuff is stable.

I think it's stable and ready to go -- hopefully everyone else will
agree :-)

Brad


--fAZXZ1G0sy
Content-Type: text/plain
Content-Description: modified setup.py
Content-Disposition: inline;
	filename="setup.py"
Content-Transfer-Encoding: 7bit

"""Distutils based setup script for Biopython.

This uses Distutils (http://python.org/sigs/distutils-sig/) the standard
python mechanism for installing packages. For the easiest installation
just type the command:

python setup.py install

For more in-depth instructions, see the installation section of the
biopython manual, linked to from:

http://biopython.org/wiki/html/BioPython/BiopythonCode.html

Or for more details about the options available from distutils, look at
the 'Installing Python Modules' distutils documentation, available from:

http://python.org/sigs/distutils-sig/doc/

Or, if all else, fails, feel free to write to the biopython list
at biopython@biopython.org and ask for help.
"""

import sys
import os
try:
    from distutils.core import setup
    from distutils.command.install import install
except ImportError:
    print "Biopython installation requires distutils, avaiable with python 2.0"
    print "or from http://python.org/sigs/distutils-sig/download.html"
    sys.exit(0)

# check if the distutils has the new extension class stuff
try:
    from distutils.extension import Extension
except ImportError:
    print "Your version of distutils is really old. You need to upgrade"
    print "to a newer version. The latest releases of distutils are available"
    print "from http://python.org/sigs/distutils-sig/download.html"
    sys.exit(0)

def check_install(program_name, import_string, location):
    """Check if a program is installed and print a warning message if not.

    This helps users at least know they are missing some installed stuff
    and where to get it when they install biopython.
    """
    try:
        exec(import_string)
    except ImportError:
        print "\nWARNING -- %s is not installed." % program_name
        print "You should install this from:"
        print location
        print "to get full functionality from Biopython.\n"
                        
class my_install(install):
    """Override the standard install to check for dependencies.

    This will just run the normal install, and then print warning messages
    if packages are missing.
    """
    def run(self):
        # run the normal install and everthing
        install.run(self)

        # now print warning messages if we are missing stuff
        check_install("Martel", "import Martel",
                      "http://www.biopython.org/~dalke/Martel/")

        check_install("mxTextTools", "import TextTools",
                      "http://www.lemburg.com/files/python/mxExtensions.html")

        check_install("Numerical Python", "from Numeric import *",
                      "http://numpy.sourceforge.net/")

setup(name='biopython', 
      version='0.90d04',
      author='The Biopython Consortium',
      author_email='biopython@biopython.org',
      url='http://www.bipoython.org/',

      cmdclass = {"install" : my_install},
      
      packages=['Bio',
                'Bio.Align',
                'Bio.Alphabet',
                'Bio.Blast',
                'Bio.Clustalw',
                'Bio.Data',
                'Bio.Encodings',
                'Bio.Entrez',
                'Bio.Enzyme',
                'Bio.Fasta',
                'Bio.GenBank',
                'Bio.Gobase',
                'Bio.Medline',
                'Bio.PDB',
                'Bio.Prosite',
                'Bio.Rebase',
                'Bio.SCOP',
                'Bio.SeqIO',
                'Bio.SubsMat',
                'Bio.SwissProt',
                'Bio.Tools',
                'Bio.Tools.Classification',
                'Bio.Tools.Parsers',
                'Bio.WWW'
                ],
      
      ext_modules = [Extension('Bio.Tools.Classification.cSVM',
                               ['Bio/Tools/Classification/cSVMmodule.c']
                               ),
                     Extension('Bio.Tools.clistfns',
                               ['Bio/Tools/clistfnsmodule.c']
                               ),
                     Extension('Bio.Tools.cmathfns',
                               ['Bio/Tools/cmathfnsmodule.c']
                               ),
                     Extension('Bio.Tools.cstringfns',
                               ['Bio/Tools/cstringfnsmodule.c']
                               )
                     ]
      )


--fAZXZ1G0sy--