Differences between revisions 16 and 25 (spanning 9 versions)
Revision 16 as of 2012-09-05 08:05:20
Size: 3009
Editor: mindlace
Comment: Changed instructions to not require root access
Revision 25 as of 2014-02-25 15:53:54
Size: 2529
Editor: terri
Comment:
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/17891360
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.  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 4: Line 4:
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
Line 6: Line 6:
== Set up your environment with virtualenv == Warning: Mailman install has changed!
Line 8: Line 8:
If you're not already set up to develop with virtualenv, you should do so:

{{{{#!table
'''Ubuntu'''
|| '''OS X'''
==
{{{$ sudo apt-get install python-setuptools python-dev build-essential}}}

|| {{{
$ brew install python

$ echo "export PATH=/usr/local/share/python:$PATH" >> ~/.bash_profile
$ source ~/.bash_profile
$ pip install distribute }}}
}}}}

You're almost there - just get virtualenv:

{{{$ 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.
The mailman core install process has changed and this document may not be perfectly up to date yet. Please take a look at the docs in  src/mailman/docs/START.rst if you have trouble.
Line 33: Line 11:
For the remaining bit, we're going to assume your virtual environment is called "postorius". You would initialize and activate it as follows: == Set up your environment ==
Line 35: Line 13:
{{{{#!table
'''virtualenv only'''
|| '''with virtualenvwrapper'''
==
{{{$ virtualenv postorius}}}
{{{$ source postorius/bin/activate}}}
Install the essentials
Line 42: Line 15:
|| {{{$ mkvirtualenv postorius}}}
}}}}
{{{$ sudo apt-get install bzr python-setuptools python-dev build-essential postfix}}}
Line 45: Line 17:
Now you should see (postorius) before your prompt.

== Get the sources ==
Get the sources
Line 55: Line 25:
If you get permission errors on this step, your ssh key is probably not in sync with what is on launchpad.net.
Line 58: Line 30:
(postorius)$ pip install django (postorius)$ pip install django==1.4
Line 61: Line 33:
== Get everything set up ==
== Set up sources ==
Line 65: Line 38:
Install and test:
Line 69: Line 40:
(postorius)$ python bootstrap.py
(po
storius)$ bin/buildout
(postorius)$ bin/test
}}}
(postorius)$ python setup.py install}}}
Line 90: Line 58:
== Postorius == === Postorius ===
Line 95: Line 63:
Line 106: Line 73:
== Profit! ==

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.  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.

Warning: Mailman install has changed!

The mailman core install process has changed and this document may not be perfectly up to date yet. Please take a look at the docs in  src/mailman/docs/START.rst if you have trouble.

Set up your environment

Install the essentials

$ sudo apt-get install bzr python-setuptools python-dev build-essential postfix

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.

Install Django

(postorius)$ pip install django==1.4
(postorius)$ pip install django-social-auth

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)$ bin/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

Máirín Duffy

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.

Máirín Duffy

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

maxking

MailmanWiki: DEV/A 5 minute guide to get the Mailman web UI running (last edited 2018-04-20 06:16:05 by maxking)