[Biopython-dev] Build & Test

Dragoslav Zaric zaricdragoslav at gmail.com
Thu Oct 28 12:24:05 EDT 2010


Hi Peter,

To bring me up to speed for build&test process, can I ask you how
exactly this process
should go.

For example if I put this in setup.py file:

class build_ext_biopython(build_ext):
    def run(self):
        if not check_dependencies_once():
            return
        if is_Numpy_installed():
            import numpy
            numpy_include_dir = numpy.get_include()
            self.extensions.append(
                Extension('Bio.Motif._pwm',
                          ["Bio/Motif/_pwm.c"],
                          include_dirs=[numpy_include_dir],
                          ))
        build_ext.run(self)

what command I should run from command line to build and test:

python3.1 setup.py build
or/and
python3.1 setup.py install

After this I will have folder build/lib/Bio, so should I go to folder build/lib
and start python3.1 to test this, or after python3.1 setup.py install it is
copied to root folder.

Also after building I will have -pwm.so file, is this final file that
is imported
from python code ?

Currently i can import Seq and Motif but when I run

m.scanPWM(Seq.Seq("ACGTGTGCGTAGTGCGT",m.alphabet))

I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "Bio/Motif/_Motif.py", line 778, in scanPWM
    import _pwm
ImportError: No module named _pwm

regards
-- 
Dragoslav Zaric

Professional Programmer
MSc Astrophysics


More information about the Biopython-dev mailing list