Skip to content

How to make a release

Olivier Grisel edited this page Jun 6, 2014 · 48 revisions
  • Write the changelog (doc/whats_new.rst). Commit counts can be generated using git log <last_release>.. | git shortlog -s -n

  • Fix Milestone issues

  • Compile documentation, make sure all examples compile.

  • Run the tests from the last release to see that all deprecations have been taken care of.

  • Tag master with X.X-branching

  • Create a new branch X.X. Next step for both branches separately (once with -git, once without)

  • Change the version number hardcoded in web page: doc/documentation.rst, and update the news on doc/index.rst

  • Change the version number in

    • doc/conf.py

    • sklearn/__init__.py

  • check on python 2.6, 2.7, 3k

  • Tag X.X branch as X.X. (use 'git tag -a' to annotate the tag, it make downstream packager's life easier)

  • then python setup.py sdist will create a .tar.gz in the dist/ directory.

  • untar and test it

  • upload packet and website to sourceforge (see doc/README).

  • using sftp make 'stable' link to the new release.

  • Set the default download to the new release.

  • upload to PyPi with python setup.py sdist upload (you might need to python setup.py register first)

  • hide the old version on the PyPi website

  • Update the mloss page: https://mloss.org/software/view/240/ (right now, Fabian and Andy are the only ones that can do that).

  • remove all deprecated features from dev that are to be removed in the next version.

  • Update the wikipedia page with the latest stable version (should we?)

Building Windows binary packages

  • Install the latest official version of Python from http://python.org both for the Python 2 and Python 3

  • Install pip for Python 2 (Python 3.4+ come with pip by default): download the get-pip.py script and run:

      c:\python27\python get-pip.py
    
  • Install numpy and scipy from the latest official windows installers from scipy.org (or alternatively from Christoph Gohlke installers as they are binary compatible (as checked in June 2014 by ogrisel)

  • Install Microsoft Visual C++ 2008 Express and Microsoft Visual C++ 2010 Express compilers (they can be installed in parallel on the same machine). Python 2 builds will automatically use the 2008 version while Python 3 build will use the 2010 version.

  • Checkout the release tag from the scikit-learn git repo and run:

      c:\Python27\Scripts\pip install wheel
      c:\Python27\python setup.py build --compiler=msvc bdist_wininst bdist_wheel
    
      c:\Python34\Scripts\pip install wheel
      c:\Python34\python setup.py build --compiler=msvc bdist_wininst bdist_wheel
    
  • Test the packages (ideally on another windows machine) by installing each of package and running nosetests --exe sklearn

  • Upload the resulting packages generated in the dist folder to PyPI and sourceforge.

Building Mac OSX binary packages

At some point this will be automated with travis. In the mean time, you can install the official Python 2 and Python 3 packages from http://python.org, pip, wheel and run:

python setup.py bdist_wheel

where python refers to the interpreter installed from python.org such as:

/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7

or

/Library/Frameworks/Python.framework/Versions/2.4/bin/python3.4

It is important to use the official python.org to build 'fat' binaries with the 10_6_intel platform tag that is compatible with all recent OSX versions (that is after 10.6). For more info on platform tags under OSX, see the Spinning wheels wiki page of the MacPython project.

Clone this wiki locally