On 22 Dez., 07:54, iain duncan <[EMAIL PROTECTED]> wrote:
> On Fri, 2007-21-12 at 18:56 -0800, iain duncan wrote:
> > I'm curious what the consensus is on "best practices" for TG and version
> > control.
>
> > - Do you use version control for the whole project, or just the package?

The whole package. I usually have a doc directory, a README,
MANIFEST.in and some distribution maintenance scripts. I want to keep
all these, plus the setup.py file, under version control.

The first thing I set up in a new project is setting some SVN
properties:

(in the project directory)
svn propedit 'svn:ignore' .

and add the following:

    *.egg-info
    build
    dist
    README.txt

I usually generate the README.txt from a template)

    svn propedit 'svn:ignore' doc

and add the following:

    api
    index.html

'api' is the directory for epydoc generated API documentation
'index.html' is the HTML documentation generated from the README

    svn propset 'svn:keywords' 'Date Author Rev' <package>/release.py

So that I can substitute the DAte an Revsion number in release.py and
use when generating the README file etc.

Also, see 
http://trac.turbogears.org/browser/projects/TurboFeeds/trunk/MANIFEST.in
as an example for a MANFEST.in file, that causes the right set of
files to be picked up whne you use "python setup.py sdist".


> > - Do you put the database in your repository too?

No, but sometimes a have bootstrap SQL scripts that go into SVN.

> > - How do you like to deploy to staging/production servers from svn ( or
> > whatever ).

I set up everything that svn export -> python setup.py bdist_egg ->
easy_install <egg> should do the trick.

> > - How do you incorporate this with a virtual env?

I usually set up the virtualenv by hand only once when the project is
deployed first, since I want to keep a stable environment for the app.
If you want, you can  write a bootstrap script for virtualenv and use
the 'after_install' function to install any extra packages your
environment needs.

> And also, how do you deal with .pyc files with your system?

I put "*.pyc" and ".pyo" on the global-ignores list. See the xample
SVN config here:

http://docs.turbogears.org/patching_guidelines#subversion-configuration


HTH, Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to