Fish Trophy

chipx86 got a fish trophy!

Fish Trophy

Add a prepare-dev.py script for preparing a development environment.

Review Request #1001 — Created Aug. 31, 2009 and submitted

Information

Review Board
master

Reviewers

Add a prepare-dev.py script for preparing a development environment.

This adds a new contrib/internal/prepare-dev.py script that sets up
the development environment for Review Board. It will automatically
do the following:

1) Create a working settings_local.py file that uses SQLite and a local
   memory cache. This uses contrib/conf/settings_local.py.tmpl as a base,
   which is now intended as the development-only settings template, since
   production users no longer need to even look at this template file.

2) Find the Djblets media directory and set up a symlink, or copy the
   media files (on Windows). This depends on a properly installed
   bleeding-edge Djblets to work.

3) Runs setup.py egg_info, which is needed for the SCMTools registration.

4) Synchronizes the database the first time.

While these are all things that can be done manually, this script makes
getting going a lot easier. It will not change existing setups, which
will continue to work fine without running this script.
Wiped out my existing configuration and ran the new script. It got me up and running to the point where I could run devserver.sh and see a working site.
david
  1. If settings_local.py.tmpl is only used for devel installs, can we rename it settings_local.py and put it in contrib/internal?
    1. We could, except the SECRET_KEY still needs to be generated, and I don't really want to encourage people to modify this file. They really should modify a copy of it.
      
      If we have them both named the same thing, and we tell someone to put such and such in this file, it could get confusing.
    2. Okay, sure.
  2. contrib/internal/prepare-dev.py (Diff revision 2)
     
     
    I'm wondering if you can check for the existence of setup.py and a reviewboard module in the current directory, just to make sure?
    1. We check inside main(), though I guess that can be too late. Rather than moving it there, I think I'll do the import inside of main, since we just pull in Site and that's needed after we do our check. Does that sound okay?
    2. Sounds good.
  3.