Handling Monkey patched commands in paver

4 views
Skip to first unread message

David

unread,
Mar 26, 2009, 9:40:29 AM3/26/09
to paver
Hi,

First, thank you very much for pavement. It is the first tool in
python on top of distutils which did not make the situation worse for
deployment issues, and I find it very useful.

Now, for the problem: I use pavement to do some developer tasks for
packages which use numpy.distutils, which is our extension to
distutils to handle all the arcane stuff needed by numpy for building
purpose. I would like paver sdist to produce the same thing as a
python setup.py sdist, but I cannot get it to work. For example, I
tried:

import setuptools
import numpy.distutils
...
from paver import setup
from paver.easy import call_task
...
@task
def sdist():
call_task('numpy.distutils.command.sdist')

But the generated tarball is not the same - numpy.distutils patches
the sdist command, but the patch does not seem to be applied in paver.
Is there somewhat a way to do what I want ?

thanks,

David

Kevin Dangoor

unread,
Mar 26, 2009, 11:53:05 AM3/26/09
to pa...@googlegroups.com
On Thu, Mar 26, 2009 at 9:40 AM, David <cour...@gmail.com> wrote:
@task
def sdist():
   call_task('numpy.distutils.command.sdist')

But the generated tarball is not the same - numpy.distutils patches
the sdist command, but the patch does not seem to be applied in paver.
Is there somewhat a way to do what I want ?

I honestly haven't tried Paver with custom distutils commands... part of my goal in creating Paver was so that I wouldn't need to make custom commands ;)   I just haven't personally been using any package that relies on custom commands.

Your best bet is to just install numpy in "develop" mode and trace your way through the running of the command to figure out what's going on. Paver generally uses distutils to run distutils commands, but there are some differences in how Paver drives distuitls.

David Cournapeau

unread,
Mar 27, 2009, 1:42:14 AM3/27/09
to pa...@googlegroups.com
On Fri, Mar 27, 2009 at 12:53 AM, Kevin Dangoor <dan...@gmail.com> wrote:
> On Thu, Mar 26, 2009 at 9:40 AM, David <cour...@gmail.com> wrote:
>>
>> @task
>> def sdist():
>>    call_task('numpy.distutils.command.sdist')
>>
>> But the generated tarball is not the same - numpy.distutils patches
>> the sdist command, but the patch does not seem to be applied in paver.
>> Is there somewhat a way to do what I want ?
>
> I honestly haven't tried Paver with custom distutils commands... part of my
> goal in creating Paver was so that I wouldn't need to make custom commands
> ;)

I hear you - I personally got as far as plugging scons into distutils
to avoid distutils pain. Unfortunately, for numpy, the extensions to
distutils are massive (numpy.distutils is as big as distutils itself),
and we can't avoid it ATM.

> Your best bet is to just install numpy in "develop" mode and trace your way
> through the running of the command to figure out what's going on.

That's exactly that I was afraid of - I just wanted to check I was
not missing something before going into the mud,

cheers,

David

Reply all
Reply to author
Forward
0 new messages