.. _release:
.. role:: strike

************************
PySAL Release Management
************************

.. contents::

Prepare the release
-------------------


- Check all tests pass.

- Edit CHANGELOG using svn2cl.sh script.

- Edit THANKS and README if needed.

- Change MAJOR, MINOR version and DOWNLOAD_URL in setup script.

- Change pysal/version.py to non-dev number

- Change the docs version from X.xdev to X.x by editing trunk/doc/source/conf.py in two places.

- Commit all changes.

Tag 
---
Make the Tag::

  $ svn copy https://pysal.googlecode.com/svn/trunk \
   https://pysal.googlecode.com/svn/tags/X.x -m "Release X.x"

Checkout the newly created tag on each build machine::

  $ svn checkout http://pysal.googlecode.com/svn/tags/<X.x>

Make docs
---------
Make the html docs:: 

  $ cd tags/X.x/doc/
  $ make html 

Create a new directory on doc server and copy new docs to it::
  
  $ mkdir -p /srv/www/pysal/public_html/<X.x>
  $ rsync -ruz doc/build/html/ geodacenter.org:/srv/www/pysal/public_html/<X.x>  (no trailing slash!)

Now, compress the HTML and upload it to the Google Code downloads_.

Make and Upload distributions
-------------------------------

- Make and upload_ to the Python Package Index in one shot!::

   $ python setup.py sdist upload

  - if not registered_, do so. Follow the prompts. You can save the
      login credentials in a dot-file, .pypirc

- :strike:`Update the release on the Python Package Index`
    - :strike:`open a new release tarball to get PKG-INFO from top level pysal directory`
    - :strike:`go to http://pypi.python.org/pypi?:action=submit_form`
    - :strike:`pick option 2 to upload the PKG-INFO`

- Make and upload releases to the Google Code downloads_.   

  - Make a source_ distribution for the build platform you're using::

    $ cd tags/X.x/
    $ python setup.py sdist  

  - Make a graphical Windows installer on a Windows box:: 

    $ cd tags/X.x/
    $ python setup.py bdist_wininst


Announce
--------
- Draft and distribute press release on geodacenter.asu.edu, openspace-list, and pysal.org

  - On GeoDa center website, do this:
   - Create a news item (copy the openspace announcement and designate a custom URL)
   - "List" Content and filter by "Featured Project". Choose to 'edit' PySAL and then modify the short text there.
   - If you click PySAL, you'll be directed to the PySAL project page, where you can edit the text there.

- Add link to released docs on Google Code site (pysal.geodacenter.org/<X.x>/index.html)

Put trunk back to dev
---------------------
- Change MAJOR, MINOR version in setup script.

- Change pysal/version.py to dev number

- Change the docs version from X.x to X.xdev by editing trunk/doc/source/conf.py in two places.

.. _upload: http://docs.python.org/2.7/distutils/uploading.html
.. _registered: http://docs.python.org/2.7/distutils/packageindex.html
.. _downloads: http://code.google.com/p/pysal/downloads
.. _source: http://docs.python.org/distutils/sourcedist.html
