Differences between revisions 14 and 34 (spanning 20 versions)
Revision 14 as of 2012-03-25 21:56:27
Size: 2873
Editor: f@state-of-mind
Comment: Migrated to Confluence 4.0
Revision 34 as of 2017-02-19 08:40:35
Size: 2597
Editor: terri
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/15171598
This is a quick guide to setup a development environment to work on 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.
#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:
== GNU Mailman 3 == }}}
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:
First download the latest revision of Mailman 3 from launchpad. Also, this 5-minute guide will not help you install HyperKitty, the web-based list archiver; for that, see [[HyperKitty/DevelopmentSetupGuide|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
Line 11: Line 22:
$ bzr branch lp:mailman
}}}
(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}}}
Line 14: Line 27:
Install and test: 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 ===
Line 17: Line 35:
$ cd mailman 
$ python bootstrap.py
$
bin/buildout
$ bin/te
st
}}}
(postorius)$ cd mailman 
(postorius)$ python setup.py install}}}
Line 26: Line 41:
$ bin/mailman start
$ cd ..
(postorius)$ mailman start
(postorius)$ cd ..
Line 32: Line 47:
== mailman.client (the Python bindings for Mailman's ReST API) ==

Download from launchpad:
=== mailman.client (the Python bindings for Mailman's ReST API) ===
Line 37: Line 50:
$ bzr branch lp:mailman.client
}}}
(postorius)$ cd mailman.client
(postorius)$ python setup.py develop
(postorius)$ cd ..}}}
Line 40: Line 54:
Install in development mode to be able to change the code without working directly on the PYTHONPATH. === Postorius ===
Line 43: Line 57:
$ cd mailman.client
$ sudo python setup.py develop
$ cd ..
}}}

== Django >= 1.3 ==

The web ui is a pluggable Django application. Therefore you need to have Django (at least version 1.3) installed. Also install the django-social-auth application (added because of open Id work going on).

{{{
$ wget http://www.djangoproject.com/download/1.3.1/tarball/ -O Django-1.3.1.tar.gz
$ tar xzf Django-1.3.1.tar.gz
$ cd Django-1.3.1
$ sudo python setup.py install
$ cd ..
}}}

== mailmanweb ==

{{{
$ bzr branch lp:postorius
$ cd postorius
$ sudo python setup.py develop
}}}
(postorius)$ cd postorius
(postorius)$ python setup.py develop
(postorius)$ cd ..}}}
Line 71: Line 64:
$ cd dev_setup
$ python manage.py syncdb
$ python manage.py runserver
(postorius)$ cd postorius_standalone
(pos
torius)$ python manage.py syncdb
(postorius)$ python manage.py runserver
Line 76: Line 69:
The last command will start the dev server on [[http://localhost:8000|http://localhost:8000]] == Profit! ==
Line 78: Line 71:
== A note for MacOS X users (and possibly others running python 2.7) ==

On an OS X 10.7 (Lion) system, some of these steps needed to be modified to use python2.6 instead of python. (In particular, bzr is known to behave badly when used python2.7 on OS X 10.7 at the moment – hopefully this will be fixed and no longer an issue soon.)

You will need to install the latest version of XCode on MacOS 10.7, which is available for free from the app store. If you had a previous version of XCode installed when you upgraded to 10.7, it will no longer work and will not have automatically been upgraded, so be prepared to install again. Once you have it installed from the app store, you will still need to go run the installer from /Applications to complete the installation.
Now go to [[http://localhost:8000|http://localhost:8000]] to see the web UI for mailman!

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

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)