[Biopython-dev] extension/distutils question

Iddo Friedberg idoerg at burnham.org
Thu Oct 3 15:43:50 EDT 2002


Hi All,

I want to build a SEG module in Python, based on an extension of  NCBI's 
seg program. I am new to extensions & distutils. Basically, I do not 
know how to define the dependency tree (see the attached Makefile of 
NCBI's distribution) of the 3 c-source files. If I just use the setup.py 
file I attached here, I get linker errors (multiple definitions).

I couldn't find a mention of this on Python's site or usenet....

Hopefully-this-will-be-answered-before-Chris-moves-server'ly yours,

Iddo


-- 
Iddo Friedberg
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037
USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 646 3171


-------------- next part --------------

all : seg

seg : seg.c lnfac.h genwin.h genwin.o
	gcc -O -o seg seg.c genwin.o -lm

hiseg : hiseg.c lnfac.h genwin.h genwin.o
	gcc -O -o hiseg hiseg.c genwin.o -lm

genwin.o : genwin.c genwin.h
	gcc -O -c genwin.c

clean:
	rm -f seg seg.o genwin.o

-------------- next part --------------
from distutils.core import setup, Extension

pyseg= Extension('pyseg',
	sources = ['seg.c', 'genwin.c', 'hiseg.c'],
	libraries = ['m'])

setup (name='pyseg',
	ext_modules=[pyseg])



More information about the Biopython-dev mailing list