Google Groups Home
Help | Sign in
New in bzr: distutils/setuptools integration, virtualenv
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Kevin Dangoor  
View profile
 More options Apr 29, 2:21 pm
From: Kevin Dangoor <dang...@gmail.com>
Date: Tue, 29 Apr 2008 14:21:07 -0400
Local: Tues, Apr 29 2008 2:21 pm
Subject: New in bzr: distutils/setuptools integration, virtualenv
A few days ago, I checked in some virtualenv integration. There's a  
'bootstrap' task that will generate a virtualenv bootstrap script.  
There's also a bootstrap script for Paver itself that gets you set up  
with nose, sphinx and docutils so that you can work on Paver itself.

Earlier today, I pushed a more significant change that's not entirely  
done yet, but is working.  Paver now has significant distutils and  
setuptools integration.

In a nutshell, when you run 'paver' on the command line, it's actually  
running the familiar setup() function, but with an extended  
Distribution class that knows how to handle Paver tasks. There's a  
wrapper class that bridges the difference between Paver and distutils.  
I'm expecting to do something similar for zc.buildout recipes, which  
will be really cool.

What does this mean for people using paver? It means that you can much  
more easily add "commands" than you can with distutils, and you can  
extend existing ones. Lets say you have additional stuff that needs to  
happen when someone runs 'develop'. Doing that with paver is now easy.  
In pavement.py:

@task
@needs('setuptools.command.develop')
def develop():
     ... do your stuff here ...

If you need to do something *around* develop, you just do this:

@task
def develop():
     ... stuff ...
     call_task('setuptools.command.develop')
     ... stuff ...

Finally, I will also be adding the ability to set options via command-
line flags, as you can do with distutils commands. (BTW, in the  
examples above any normal command line options for develop will  
work... and you should be able to even specify those options in the  
pavement's options()).

I need to clean up the code and docs, add the command line options  
stuff, etc. And I'm sure there are corner cases. But, it's working  
pretty well.

One more nice bit: you can create a setup.py that looks like this:

import paver.command

paver.command.main()

and it will behave just like a traditional setup.py!

I plan to add a generator task for that and some additional goodies to  
make it trivial to bootstrap at this point when most people (heh)  
don't have paver installed.

Kevin


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google