Skip to content

Commit

Permalink
Update for new downloads page location. Update releasing docs. Update…
Browse files Browse the repository at this point in the history
… `download_url` so `setup.py register` works without additional intervention.
  • Loading branch information
mdboom committed Jan 8, 2013
1 parent 8bdc2c6 commit a5dff77
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 75 deletions.
37 changes: 3 additions & 34 deletions doc/_templates/index.html
Expand Up @@ -3,38 +3,6 @@


{% block body %}
<script>
function getSnippet(id, url) {
var req = false;
// For Safari, Firefox, and other non-MS browsers
if (window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch (e) {
req = false;
}
} else if (window.ActiveXObject) {
// For Internet Explorer on Windows
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
req = false;
}
}
}
var element = document.getElementById(id);
if (req) {
// Synchronous request, wait till we have it all
req.open('GET', url, false);
req.send(null);
element.innerHTML = req.responseText;
}
}
</script>


<h1>John Hunter (1968-2012)</h1>

Expand Down Expand Up @@ -100,8 +68,9 @@ <h1>Introduction</h1>

<h1>Download</h1>

Matplotlib is available for
<a href="https://github.com/matplotlib/matplotlib/downloads">download</a>.
Visit the
<a href="http://matplotlib.org/downloads.html">matplotlib downloads
page</a>.

<h1>Documentation</h1>

Expand Down
33 changes: 32 additions & 1 deletion doc/_templates/layout.html
@@ -1,8 +1,40 @@
{% extends "!layout.html" %}

<script>
function getSnippet(id, url) {
var req = false;
// For Safari, Firefox, and other non-MS browsers
if (window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch (e) {
req = false;
}
} else if (window.ActiveXObject) {
// For Internet Explorer on Windows
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
req = false;
}
}
}
var element = document.getElementById(id);
if (req) {
// Synchronous request, wait till we have it all
req.open('GET', url, false);
req.send(null);
element.innerHTML = req.responseText;
}
}
</script>

{% block rootrellink %}
<li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
<li><a href="http://www.matplotlib.org/downloads.html">downloads</a>|&nbsp;</li>
<li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
<li><a href="{{ pathto('examples/index') }}">examples</a>|&nbsp;</li>
<li><a href="{{ pathto('gallery') }}">gallery</a>|&nbsp;</li>
Expand Down Expand Up @@ -50,4 +82,3 @@
{# put the sidebar before the body #}
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
{% block sidebar2 %}{% endblock %}

130 changes: 114 additions & 16 deletions doc/devel/release_guide.rst
Expand Up @@ -4,7 +4,7 @@
Doing a matplolib release
*************************

A guide for developers who are doing a matplotlib release
A guide for developers who are doing a matplotlib release.

* Edit :file:`__init__.py` and bump the version number

Expand Down Expand Up @@ -34,7 +34,8 @@ Branching
=========

Once all the tests are passing and you are ready to do a release, you
need to create a release branch::
need to create a release branch. These only need to be created when
the second part of the version number changes::

git checkout -b v1.1.x
git push git@github.com:matplotlib/matplotlib.git v1.1.x
Expand All @@ -52,14 +53,14 @@ affiliate your name with it. A reasonable tag message would be something
like ``v1.1.0 Release Candidate 1 (September 24, 2011)``. To tag a
release after the fact, just track down the commit hash, and::

git tag -a v1.0.1 a9f3f3a50745
git tag -a v1.0.1rc1 a9f3f3a50745

Tags allow developers to quickly checkout different releases by name,
and also provides source download via zip and tarball on github.

Then push the tags to the main repository::

git push upstream v1.0.1
git push upstream v1.0.1rc1

.. _release-packaging:

Expand All @@ -80,7 +81,7 @@ Packaging
after any changes to :file:`setup.cfg` before rebuilding since cruft
in the :file:`build` dir can get carried along.

* on windows, unix2dos the rc file
* On windows, unix2dos the rc file.

* We have a Makefile for the OS X builds in the mpl source dir
:file:`release/osx`, so use this to prepare the OS X releases.
Expand All @@ -89,17 +90,92 @@ Packaging
:file:`release/win32` which you can use this to prepare the windows
releases.

.. _release-candidate-testing:
Posting files
=============

Release candidate testing
=========================
Our current method is for the release manager to collect all of the
binaries from the platform builders and post the files online on
Sourceforge. It is also possible that those building the binaries
could upload to directly to Sourceforge.

Post the release candidates tarballs to the `matplotlib download page
<https://github.com/matplotlib/matplotlib/downloads>`_. If you have
developer rights, you should see an "Upload a new file" section
there.
There are many ways to upload files to Sourceforge (`scp`, `rsync`,
`sftp`, and a web interface) described in `Sourceforge Release File
System documentation
<https://sourceforge.net/apps/trac/sourceforge/wiki/Release%20files%20for%20download>`_.
Below, we will use `sftp`.

.. _release-announcing:
1. Create a directory containing all of the release files and `cd` to it.

2. `sftp` to Sourceforge::

sftp USERNAME@frs.sourceforge.net:/home/frs/project/matplotlib/matplotlib

3. Make a new directory for the release and move to it::

mkdir matplotlib-1.1.0rc1
cd matplotlib-1.1.0rc1

4. Upload all of the files in the current directory on your local machine::

put *

If this release is a final release, the default download for the
matplotlib project should also be updated. Login to Sourceforge and
visit the `matplotlib files page
<https://sourceforge.net/projects/matplotlib/files/matplotlib/>`_.
Navigate to the tarball of the release you just updated, click on
"Details" icon (it looks like a lower case ``i``), and make it the
default download for all platforms.

There is a list of direct links to downloads on matplotlib's main
website. This needs to be manually generated and updated every time
new files are posted.

1. Clone the matplotlib documentation repository and `cd` into it::

git clone git@github.com:matplotlib/matplotlib.github.com.git
cd matplotlib.github.com

2. Update the list of downloads that you want to display by editing
the `downloads.txt` file. Generally, this should contain the last two
final releases and any active release candidates.

3. Update the downloads webpage by running the `update_downloads.py`
script. This script requires `paramiko` (for `sftp` support) and
`jinja2` for templating. Both of these dependencies can be
installed using pip::

pip install paramiko
pip install jinja2

Then update the download page::

./update_downloads.py

You will be prompted for your Sourceforge username and password.

4. Commit the changes and push them up to github::

git commit -m "Updating download list"
git push

Update PyPI
===========

Once the tarball has been posted on Sourceforge, you can register a
link to the new release on PyPI. This should only be done with final
(non-release-candidate) releases, since doing so will hide any
available stable releases.

You may need to set up your `.pypirc` file as described in the
`distutils register command documentation
<http://docs.python.org/2/distutils/packageindex.html>`_.

Then updating the record on PyPI is as simple as::

python setup.py register

This will hide any previous releases automatically.

Documentation updates
=====================
Expand All @@ -108,6 +184,27 @@ The built documentation exists in the `matplotlib.github.com
<https://github.com/matplotlib/matplotlib.github.com/>`_ repository.
Pushing changes to master automatically updates the website.

The documentation is organized by version. At the root of the tree is
always the documentation for the latest stable release. Under that,
there are directories containing the documentation for older versions
as well as the bleeding edge release version called `dev` (usually
based on what's on master in the github repository, but it may also
temporarily be a staging area for proposed changes). There is also a
symlink directory with the name of the most recently released version
that points to the root. With each new release, these directories may
need to be reorganized accordingly. Any time these version
directories are added or removed, the `versions.html` file (which
contains a list of the available documentation versions for the user)
must also be updated.

To make sure everyone's hard work gets credited, regenerate the github
stats. `cd` into the tools directory and run::

python github_stats.py $TAG > ../doc/users/github_stats.rst

where `$TAG` is the tag of the last major release. This will generate
stats for all work done since that release.

In the matplotlib source repository, build the documentation::

cd doc
Expand All @@ -130,6 +227,7 @@ changes upstream::
Announcing
==========

Announce the release on matplotlib-announce, matplotlib-users and
matplotlib-devel. Include a summary of highlights from the CHANGELOG
and/or post the whole CHANGELOG since the last release.
Announce the release on matplotlib-announce, matplotlib-users, and
matplotlib-devel. Final (non-release-candidate) versions should also
be announced on python-announce. Include a summary of highlights from
the CHANGELOG and/or post the whole CHANGELOG since the last release.
24 changes: 1 addition & 23 deletions doc/faq/installing_faq.rst
Expand Up @@ -235,28 +235,6 @@ then you will need to set your PYTHONPATH, eg::

See also ref:`environment-variables`.

.. _easy-install-osx-egg:

easy_install from egg
---------------------

You can also use the eggs we build for OSX (see the `installation
instructions
<http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other>`_
for easy_install if you do not have it on your system already). You
can try::

> easy_install matplotlib

which should grab the latest egg from github, but sometimes the naming
conventions for OSX eggs can be broken (see below). Therefore, there
is no guarantee the right egg will be found. We recommend you download
the latest egg from our `download site
<https://github.com/matplotlib/matplotlib/downloads>`_ directly to your
harddrive, and manually install it, eg::

> easy_install --install-dir=~/path/to/site-packages/ matplotlib-1.2.0-py2.7-macosx-10.5-i386.egg

.. _install_from_source_on_osx_epd:

Building and installing from source on OSX with EPD
Expand Down Expand Up @@ -323,7 +301,7 @@ Binary installers for Windows

If you have already installed python, you can use one of the
matplotlib binary installers for windows -- you can get these from the
`download <https://github.com/matplotlib/matplotlib/downloads>`_ site.
`download <http://matplotlib.org/downloads.html>`_ site.
Choose the files that match your version of python (eg ``py2.7`` if
you installed Python 2.7) which have the ``exe`` extension. If you
haven't already installed python, you can get the official version
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Expand Up @@ -99,7 +99,7 @@
"""
from __future__ import print_function

__version__ = '1.2.0'
__version__ = '1.2.0dev'
__version__numpy__ = '1.4' # minimum required numpy version

import os, re, shutil, subprocess, sys, warnings
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -322,6 +322,7 @@ def run_2to3(self, files):
interfaces and hardcopy output formats. There is a 'pylab' mode
which emulates matlab graphics
""",
download_url="https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-{0}/matplotlib-{0}.tar.gz".format(__version__),
packages = packages,
platforms='any',
py_modules = py_modules,
Expand Down

0 comments on commit a5dff77

Please sign in to comment.