Size: 3009
Comment: Changed instructions to not require root access
|
Size: 2597
Comment: Link to the most up to date guide on this wiki
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
#pragma page-filename DEV/versions/15171649 This is a quick guide to setup a development environment to work on Postorius, Mailman 3's web ui. If all goes as planned, you should be done within ~5 minutes. This has been tested on Ubuntu 11.04 and OS X 10.8.1. |
#pragma page-filename DEV/versions/13303871 |
Line 4: | Line 3: |
In order to download the components necessary you need to have the Bazaar VCS installed on your system. Mailman and mailman.client need at least Python version 2.6. | {{{#!wiki warning '''This guide is obsolete! See [[DEV/SetupDevEnvironment]] to setup mailman3.''' |
Line 6: | Line 6: |
== Set up your environment with virtualenv == | }}} This is a quick guide to setup a development environment to work on [[DEV/Web Interface|Postorius, Mailman 3's web UI]] (and, in the process, install the core Mailman engine and Mailman.client as well). If all goes as planned, you should be done within ~5 minutes. This has been tested on Ubuntu 11.04 and OS X 10.8.1. Please note that the Python provided by apple for OSX ''will not work''; you need to install your own version of python (e.g. using fink or macports). The [[../Mac Mailman development setup guide|Mac Mailman development setup guide]] has instructions using homebrew if you need additional instructions. |
Line 8: | Line 9: |
If you're not already set up to develop with virtualenv, you should do so: | Also, this 5-minute guide will not help you install HyperKitty, the web-based list archiver; for that, see [[HyperKitty/DevelopmentSetupGuide|this guide]]. |
Line 10: | Line 11: |
{{{{#!table '''Ubuntu''' || '''OS X''' == {{{$ sudo apt-get install python-setuptools python-dev build-essential}}} |
== Set up your environment == |
Line 16: | Line 13: |
|| {{{ $ brew install python |
Install the essentials |
Line 19: | Line 15: |
$ echo "export PATH=/usr/local/share/python:$PATH" >> ~/.bash_profile $ source ~/.bash_profile $ pip install distribute }}} }}}} |
{{{$ sudo apt-get install bzr python-dev python-virtualenv build-essential postfix}}} |
Line 24: | Line 17: |
You're almost there - just get virtualenv: | Set up a virtual environment (here we're calling it "postorius"). |
Line 26: | Line 19: |
{{{$ pip install virtualenv}}} {{{#!wiki important You may wish to install [[http://virtualenvwrapper.readthedocs.org/en/latest/index.html|Virtualenvwrapper]] as well for managing your environment with ease. }}} For the remaining bit, we're going to assume your virtual environment is called "postorius". You would initialize and activate it as follows: {{{{#!table '''virtualenv only''' || '''with virtualenvwrapper''' == {{{$ virtualenv postorius}}} {{{$ source postorius/bin/activate}}} || {{{$ mkvirtualenv postorius}}} }}}} Now you should see (postorius) before your prompt. == Get the sources == |
Get the sources |
Line 55: | Line 27: |
== Install Django == | If you get permission errors on this step, your ssh key is probably not in sync with what is on launchpad.net. |
Line 57: | Line 29: |
{{{ (postorius)$ pip install django (postorius)$ pip install django-social-auth}}} |
|
Line 61: | Line 30: |
== Get everything set up == | == Set up sources == |
Line 65: | Line 34: |
Install and test: |
|
Line 69: | Line 36: |
(postorius)$ python bootstrap.py (postorius)$ bin/buildout (postorius)$ bin/test }}} |
(postorius)$ python setup.py install}}} |
Line 77: | Line 41: |
(postorius)$ bin/mailman start | (postorius)$ mailman start |
Line 90: | Line 54: |
== Postorius == | === Postorius === |
Line 95: | Line 59: |
Line 106: | Line 69: |
== Profit! == |
This guide is obsolete! See DEV/SetupDevEnvironment to setup mailman3.
This is a quick guide to setup a development environment to work on Postorius, Mailman 3's web UI (and, in the process, install the core Mailman engine and Mailman.client as well). If all goes as planned, you should be done within ~5 minutes. This has been tested on Ubuntu 11.04 and OS X 10.8.1. Please note that the Python provided by apple for OSX will not work; you need to install your own version of python (e.g. using fink or macports). The Mac Mailman development setup guide has instructions using homebrew if you need additional instructions.
Also, this 5-minute guide will not help you install HyperKitty, the web-based list archiver; for that, see this guide.
Set up your environment
Install the essentials
$ sudo apt-get install bzr python-dev python-virtualenv build-essential postfix
Set up a virtual environment (here we're calling it "postorius").
Get the sources
(postorius)$ bzr branch lp:mailman (postorius)$ bzr branch lp:mailman.client (postorius)$ bzr branch lp:postorius (postorius)$ bzr branch lp:~mailman-coders/postorius/postorius_standalone
If you get permission errors on this step, your ssh key is probably not in sync with what is on launchpad.net.
Set up sources
GNU Mailman 3
(postorius)$ cd mailman (postorius)$ python setup.py install
If you get no errors you can now start Mailman:
(postorius)$ mailman start (postorius)$ cd ..
At this point Mailman will not send nor receive any real emails. But that's fine as long as you only want to work on the components related to the ReST client or the web ui.
mailman.client (the Python bindings for Mailman's ReST API)
(postorius)$ cd mailman.client (postorius)$ python setup.py develop (postorius)$ cd ..
Postorius
(postorius)$ cd postorius (postorius)$ python setup.py develop (postorius)$ cd ..
Start the development server
(postorius)$ cd postorius_standalone (postorius)$ python manage.py syncdb (postorius)$ python manage.py runserver
Profit!
Now go to http://localhost:8000 to see the web UI for mailman!
Comments
It looks like bootstrap.py was removed in late July, marked as obsolete. I followed these instructions to get mailman and postorious running, except I replaced the bootstrap.py step with the following:
virtualenv --system-site-packages /path/to/your/installation $ source /path/to/your/installation/bin/activate $ python setup.py install
Now, if you get weird errors, remove the --system-site-packages from your virtualenv and try again. I guess depending on how your system is setup, it may or may not work with that option.
I wrote up a guide on how to get hyperkitty up and running for development, and it includes the full modified steps I ran based on this document to get mailman 3 working. That guide is here:
https://fedorahosted.org/hyperkitty/wiki/DevelopmentSetupGuide
The latest setup guide is available here: http://gnu-mailman.readthedocs.org/en/latest/src/mailman/docs/WebUIin5.html