Hi,

I just finished packaging scipy (www.scipy.org).  Scipy uses a pretty
complicated setup.py file that manages running f2py, compiling f77
code, compiling several helper modules (including a patched copy of
Numeric), etc.

Most of the python modules I have seen packaged for debian use a
makefile rather than setup.py.  I really don't want to rewrite the
complicated build logic into a makefile.  

What is the best way to use the setup.py in the debian/rules?

Here are some fragments from the debian/rules file I have so far.  It
seems to work, but any suggestions would be appreciated.

- JMR





configure: configure-stamp
configure-stamp:
        dh_testdir
        # Add here commands to configure the package.

        touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
        dh_testdir

        # Add here commands to compile the package.
        python setup.py build
        touch build-stamp

clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp

        # Add here commands to clean up after the build process.
        -python setup.py clean
        -rm -rf build
        -rm -rf dist
        -rm *.pyc *.pyo */*.pyc */*.pyo

        dh_clean -Xincluded_functions.html.orig

install: build
        dh_testdir
        dh_testroot
        dh_clean -k -Xincluded_functions.html.orig
        dh_installdirs

        # Add here commands to install the package into debian/scipy.
        -mkdir debian/scipy
        -python setup.py bdist
        cd debian/scipy && tar zxvf ../../dist/SciPy-0.2.0.linux-*.tar.gz






-- 
Joseph M. Reinhardt, Ph.D.   Department of Biomedical Engineering
[EMAIL PROTECTED]      University of Iowa, Iowa City, IA  52242
Telephone: 319-335-5634      FAX:       319-335-5631


Reply via email to