Skip to content

How to make a release

Andreas Mueller edited this page Dec 9, 2015 · 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.

  • Make sure that both travis and appveyor tests pass on master

  • Tag master with X.X-branching

  • Create a new branch X.X. Next step for both branches separately (once for master, once for the release branch)

  • Change the version number hardcoded in web page: doc/documentation.rst, and change the links on doc/documentation.rst to "other versions".

  • add the previous stable to doc/support.rst

  • Change the links inside the menu bar in doc/themes/scikit-learn/layout.html

  • Update the news on doc/index.rst.

  • Change the version number in sklearn/__init__.py.

  • check on python 2.6, 2.7, 3.4, 3.5

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

  • Trigger the build of the OSX wheel packages by following the instructions of the readme of the MacPython/scikit-learn-wheels repo and check the results on travis at: https://travis-ci.org/MacPython/scikit-learn-wheels

  • Check that appveyor could successfully build and test the Windows wheel packages for the tagged commit.

  • Fetch the build artifacts of the release:

    pip install wheelhouse-uploader
    python setup.py fetch_artifacts
    
  • clean the generated docs: cd doc && make clean to avoid including all the images generated for the HTML website in the source distribution (otherwise the generate archive is much to big).

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

  • untar and test it

  • upload package to sourceforge, Set the default download to the new release.

  • Build the docs and push them to the https://github.com/scikit-learn/scikit-learn.github.io repo under stable/

  • Upload both the tarball and the wheel packages to PyPi with python setup.py upload_all (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

Here are the steps to build scikit-learn packages under Windows. The first steps of this list are automated in the continuous_integration//windows/windows_testing_downloader.ps1 powershell helper script.

You should be able to download and run this script with the following one-liner to copy and paste in a console as Administrator:

powershell.exe -ExecutionPolicy unrestricted "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/continuous_integration/windows/windows_testing_downloader.ps1'))"
  • Install the latest official version of Python from http://python.org both for Python 2 and Python 3

  • Install pip for Python 2 (Python 3.4+ comes 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/3.4/bin/python3.4

It is important to use the official python.org dmg package for Python to be able to build 'fat' wheel packages (32 and 64bit combined) with the macosx_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.

Before uploading to PyPI, rename the generated wheel files to replace the macosx_10_6_intel platform tag by macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64 so that people who installed Python from macports, brew or built it from source can still install those wheels with pip install scikit-learn.

Clone this wiki locally