Labs/Bespin/DeveloperGuide/Setup: Difference between revisions
Olleolleolle (talk | contribs) (→Getting Started: added note about SproutCore branch) |
No edit summary |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
Thanks for downloading the code to the Bespin project. You can easily get Bespin's Python server running on your local Mac or Linux machine (see note about Windows below). | Thanks for downloading the code to the Bespin project. You can easily get Bespin's Python server running on your local Mac or Linux machine (see note about Windows below). | ||
== Prerequisites == | == Prerequisites == | ||
Line 12: | Line 6: | ||
*Mercurial | *Mercurial | ||
*Python 2.5 or 2.6 | *Python 2.5 or 2.6 | ||
Python 2.6 is preferred. | |||
'''NOTE FOR LINUX USERS:''' ''If you are running on a Linux system, you will likely need a "python-dev" (on Ubuntu; possibly "python-devel" elsewhere) package installed, if you do not already have it.'' | '''NOTE FOR LINUX USERS:''' ''If you are running on a Linux system, you will likely need a "python-dev" and "ruby1.8-dev" (on Ubuntu; possibly "python-devel" elsewhere) package installed, if you do not already have it. If you want to build the embedded release, you will want libyaml: the package on Ubuntu is "libyaml-dev".'' | ||
'''NOTE FOR MAC USERS:''' ''You will need Xcode installed.'' | '''NOTE FOR MAC USERS:''' ''You will need Xcode installed.'' | ||
Line 39: | Line 30: | ||
python bootstrap.py --no-site-packages | python bootstrap.py --no-site-packages | ||
to get the environment set up. This is built around [http://pypi.python.org/pypi/virtualenv virtualenv]. | to get the environment set up. This is built around [http://pypi.python.org/pypi/virtualenv virtualenv]. Please watch for helpful hints and instructions on screen. | ||
In Unix-like environments, the next step is to activate the virtualenv using this command: | |||
source bin/activate | |||
on Windows, the command is Scripts/activate.bat | |||
Once the virtualenv is activate, you need to get the server set up: | |||
paver install_server | |||
And the first time around, you're also going to want to get a database set up: | |||
paver create_db | |||
If you have some trouble on macos x like the error message: ImportError: No module named `xxx' | |||
It's probably cause the server side is not completely installed so try | |||
cd ../bespinserver | |||
paver develop | |||
paver create_db | |||
==Starting the development server== | |||
If you are no longer (or not yet) in the virtualenv environment run within the bespinclient directory: | |||
source bin/activate | |||
To start the server execute: | |||
paver start | |||
This will start the Bespin server. You can now access the Bespin editor at http://localhost:8080/ in you browser. | |||
Have fun! | |||
==More Documentation== | ==More Documentation== | ||
The documentation of the last release is [https://bespin.mozillalabs.com/docs/ here]. | |||
==Contributing to Bespin== | ==Contributing to Bespin== |
Latest revision as of 07:23, 23 June 2010
Thanks for downloading the code to the Bespin project. You can easily get Bespin's Python server running on your local Mac or Linux machine (see note about Windows below).
Prerequisites
You will need the following installed on your system to get Bespin up and running:
- Mercurial
- Python 2.5 or 2.6
Python 2.6 is preferred.
NOTE FOR LINUX USERS: If you are running on a Linux system, you will likely need a "python-dev" and "ruby1.8-dev" (on Ubuntu; possibly "python-devel" elsewhere) package installed, if you do not already have it. If you want to build the embedded release, you will want libyaml: the package on Ubuntu is "libyaml-dev".
NOTE FOR MAC USERS: You will need Xcode installed.
NOTE FOR WINDOWS USERS: Most Bespin developers are using unix-like platforms. Bespin's server should be able to run on Windows, though. You'll need a C compiler, and you can use Microsoft's free Visual C++ compiler. As an alternative, you can use Cygwin or MinGW to have a unix-like environment on your Windows system.
Getting Started
Run:
hg clone http://hg.mozilla.org/labs/bespinclient hg clone http://hg.mozilla.org/labs/bespinserver cd bespinclient
This will get the Bespin client and Python Bespin server code checked out. The bespinclient/
directory is the "main" directory that you'll use. (See the Using Mercurial article for more detailed instructions on using Mercurial.)
To set up Bespin for the first time, run:
python bootstrap.py --no-site-packages
to get the environment set up. This is built around virtualenv. Please watch for helpful hints and instructions on screen.
In Unix-like environments, the next step is to activate the virtualenv using this command:
source bin/activate
on Windows, the command is Scripts/activate.bat
Once the virtualenv is activate, you need to get the server set up:
paver install_server
And the first time around, you're also going to want to get a database set up:
paver create_db
If you have some trouble on macos x like the error message: ImportError: No module named `xxx' It's probably cause the server side is not completely installed so try
cd ../bespinserver paver develop paver create_db
Starting the development server
If you are no longer (or not yet) in the virtualenv environment run within the bespinclient directory:
source bin/activate
To start the server execute:
paver start
This will start the Bespin server. You can now access the Bespin editor at http://localhost:8080/ in you browser.
Have fun!
More Documentation
The documentation of the last release is here.
Contributing to Bespin
For details see: