New Release

Aaron Meurer edited this page Nov 21, 2012 · 89 revisions

TODO Automate this whole process. See

This is a step by step guide on how to make a new release of SymPy. If you are following it to make a new release, please update it with any corrections or problems that you come across. This guide was written with 0.7.0 as the sample release. Replace "0.7.0" in the commands with the version that you are releasing, and "0.6.7" with the previous version.

How to Make a New Release

Proposed workflow (for the 0.7.0 release, for example)

  1. Fix all blockers (i.e., issues marked with the label Milestone-Release0.7.0), or postpone them if they aren't too important and will take too much work to fix. While you're doing this, it's a good idea to start writing the release notes. See "Release notes" below.
  2. Create a new branch 0.7.0, in the sympy repo (the official one) and do the release patches in it.
  3. Create a pull request for the sympy branch to master. Do not merge this until after you have released. Note that GitHub won't let you create a pull request until made at least one commit on the branch. People can then run sympy-bot on the branch with sympy-bot review <PR number> -m HEAD.
  4. Continue in master just like if nothing was happening. Go ahead and change the version number in master (e.g., to 0.7.0-git). Note that because of this, you'll have to do the final merge manually.
  5. Create rc1 from the 0.7.0 branch, test it, push fixes to 0.7.0. do rc2 etc. do final release.
  6. Wait for some time and see if all is ok, possibly do some release fixes (like wait for one week).
  7. Merge 0.7.0 with master, delete the branch.
  8. If more fixes are needed, simply fork from the latest 0.7.0 tag, and push more fixes, release and merge.

Note that some of the stuff below tests things in master (like the test_pure* scripts). If you choose this route, you may need to modify them to test the 0.7.0 branch).

Are All Tests Included?

As directed in, check the tests list using the command:

$ python bin/

Are All Modules Included?

As directed in, check the module list using the command:

for i in `find sympy -name | rev | cut -f 2- -d '/' | rev | egrep -v "^sympy$" | egrep -v "tests$" `; do echo "'${i//\//.}',"; done | sort

Does It Depend on Python 2.5-2.7, 3.2-3.3 only?

Run the tests sandboxed using tox. See Using-Tox and the tox.ini.sample file in the git repo.

Speed of Import

After several runs, this should be around:

$ ipython

In [1]: time import sympy
CPU times: user 0.08 s, sys: 0.00 s, total: 0.09 s
Wall time: 0.09

You can also use the test_import utility like this:

$ bin/test_import
Note: the first run (warm up) was not included in the average + std dev
All runs (including warm up):
[0.112630844116, 0.112730026245, 0.13080096244799999, 0.11622381210299999, 0.113546848297, 0.13612699508699999, 0.115744113922, 0.112670898438, 0.11331987381, 0.13219594955399999, 0.113155126572]
Number of tests: 10
The speed of "import sympy" is: 0.119651 +- 0.008924

Run this in the last release and see it the tolerance intervals overlap. If they do, there is no statistically significant change in the import time. If they do not, and the new time is slower, you should investigate.

You should not compare them with the timings pasted here, as they were probably run on a different machine, and are thus not comparable to yours.

Do All Tests Run in the Isolated Environment?

Do this on the git version:

$ bin/test_isolated
Generating py.test isolated testsuite...
Done. Run '/tmp/'.
$ /tmp/ |less

And check manually, that no py.test run generated a stack trace. (search for "COMMIT" in the less environment, when all tests have finished)

Do the Slow Tests Pass?

Run the slow tests with

$ ./bin/test --slow

Note that these will take a really long time to finish. This should be tested in all relevant configurations.

Do all Examples Work?

$ examples/ -w

Make sure no traceback is generated and this is printed at the end:


Note that the -w will make it also run windowed examples, which will require things like pyglet and matplotlib to be installed to work.

Also, make sure that all the examples are included in by comparing the included modules with the output of ls -R examples.

You also should check that all the notebooks are OK. For now, this means opening all the notebooks in the latest version of IPython and making sure that everything renders OK and that if you re-execute all the cells, that nothing changes. Also, make sure that the cell numbering is 1, 2, 3... (you can get this by restarting the IPython kernel and re-executing all cells. In the future, we will hopefully automate this process.

Does pyglet Work?

Create a file with

from sympy import Symbol, cos, sin, Plot, log, tan
from import x, y
print Plot(cos(x)*sin(y), sin(x)*sin(y), cos(y)+log(tan(y/2))+0.2*x, [x, -0.00,
    12.4, 40], [y, 0.1, 2, 40])

Then I create a file tox.ini.plotting with

envlist = py25,py26,py27

basepython = /Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
commands = pythonw

basepython = /Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
commands = pythonw

basepython = /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
commands = pythonw

(Python 2.5 requires ctypes, see If you do not use Mac OS X, you will need to modify the basepython lines, or just remove them.

Then, run

$tox -c tox.ini.plotting

And verify that the plots open correctly all three times.

Note, because of the pythonw calls, the above tox call does not actually run from the virtualenv. Therefore, you will have to have Pyglet installed in each version of Python. You can get it at We should support whatever the latest version is.

In Linux, it might work without the pythonw. So if it says it can't find pythonw, try changing it to just python.

Check All Tests in sympy/external

Currently numpy, scipy, sage, and some fortran compilers. Open the test files to see what libraries you need to install for them to run. To run the sage tests, you have to run sage -python bin/test sympy/external/tests/ (see the docstring of the sympy/external/tests/ file).

Check Docs

$ cd doc
$ make clean
$ make html
$ make htmli18n
$ # open _build/html/index.html in your preferred web browser

Note that Sphinx shouldn't output any errors when building the docs (many errors result in parts of the documentation not being included, so this is important).

Also check that the pdf docs work. This require LaTeX, XeTeX, DejaVu Sans Mono, and Inkscape.

$ make clean
$ make latex
$ cd _build/latex
$ make all

There will be a bunch of warnings in the LaTeX, but if it finishes building, it will be OK. Open the built pdf (it will be called sympy-0.7.0-git.pdf, or something like that), and make sure it looks OK.

Finally, do make clean. You will want to rebuild the docs again after you change the version number, so that it is correct in the docs (or just do that part first :)

Note that due to quirkinesses of Sphinx, you will want to run make clean between each doc build, just to be sure that everything come out right.

Update versions and authors

Update the version in src/, update the list of contributors both in docs and in AUTHORS, using (for example, for the 0.7.0 release):

$ git shortlog -ns sympy-0.6.7..

(use the tag of the latest release) and then update the information what each contributor changed using

$ git shortlog -n sympy-0.6.7..

See also the bit about .mailmap below for another useful git command to use here.

Does the Tarball Contain all the Needed Files?

The previous paragraph tests, that all tests pass in the tarball, but still check by inspection, that the tarball includes all necessary files. Files in the bin directory are potentially installed to /usr/bin, so be careful.

You may have a look an at which defines the files to be included in the tarball.

Do the Actual Release

Change version in sympy/ and doc/src/, e.g.

vim doc/src/  # Or your preferred text editor
vim sympy/
git commit -a -m "SymPy 0.7.0 release"

Make sure you also change it everywhere else by doing git grep 0\.6\.7 (replacing 0\.6\.7 with the last release version).

Change the copyright year in README if needed. Note that this should be done at the beginning of each year.

Tag it, e.g.

git tag sympy-0.7.0

Prepare the release tarball and win32 installer (should work ok even on Linux)

./ clean
./ sdist
./ bdist_wininst

Then run

rm -rf py3ksympy
cd py3ksympy

and run the three above commands again.

Note: It's possible to make a 64-bit Windows installer if you are on Windows. See and

Compile the html documentation

cd doc
make clean
make html
cd _build
mv html sympy-docs-html-0.7.0
zip -9lr sympy-docs-html-0.7.0

Do the same thing for the Python 3 docs that are generated by use2to3.

And put dist/sympy-0.7.0.tar.gz, dist/sympy-0.7.0.win32.exe and on the website. Note that depending on what operating system you run the above in, you may need to rename the Windows binary to sympy-0.7.0.win32.exe (as mentioned above, even if you compile it in Linux or Mac OS X, it should still work in Windows).

Upload these files to Use the files from previous versions as a guide. Be sure to remove the "Featured" tag from the files from the previous release.

Change version to 0.7.0-git, and start new development cycle

vim sympy/
git ci -a -m 'Start of 0.7.1 development cycle'

Don't forget to finally push you changes back to the main repository:

git push master

Get List of Authors who Contributed to the Release

Use git log sympy-0.6.7.. --format="%aN" --reverse | sort -u to get the list of contributors (see this page).

This is a good time to update the .mailmap file, so that there are no duplicates. You may need to email the people in question concerning the preferred spelling of their names/preferred email addresses, though you should generally prefer real email address to auto-generated addresses (like devnull@localhost or john@example.(None)), and names with accents to names without accents. This should also be in sync with the AUTHORS file. If you can't contact someone about the preferred email or name spelling, just use the version in the AUTHORS file. Note that when you update the .mailmap file, you should use the command git log --format="%aN <%aE>" | sort -u, which will show the whole log and include email addresses.

Make .mailmap completely up-to-date, and then it will be easy to find if there are any people missing from AUTHORS and doc/src/aboutus.txt. There are five people in AUTHORS who are not in the git history (they are marked with a *), and one person in the git history who is not in AUTHORS (by request). Therefore, the number of people in AUTHORS should be exactly four more than from git log --format="%aN" --reverse | sort -u | wc -l. Otherwise, people are missing, and they should be added before the release. Missing people in AUTHORS/aboutus should be added in the order of the first contribution. The easiest way to determine this for a missing person is to find the first commit that of that person (or technically, the first merge commit that put it in master), check that commit out, and look at the state of AUTHORS from that point in history.

See also the comments at the top of the AUTHORS and .mailmap.

Sort the authors everywhere by last name. Note that we decided to do this, instead of sorting by number commits or number of lines changed for fairness purposes (for example, if someone updates mpmath, they will unfairly have a larger count of line's changed; this can also happen, e.g., if someone moves some files around). You can change the above bash command to use sort -u -k 2 which sorts on the second "field" in the list, which should be the last name.

This list should be included at the bottom of the release notes. Mark anyone who contributed for the first time for this release with a * (you can get this list by running git diff sympy-0.6.7..sympy-0.7.0 -- AUTHORS).

Building a Mac OS X Installer Package

Note, this relies on

A Mac OS X PackageMaker project file can be found under the data/OS X Package directory. It references the isympy shell, its man page, and the sympy subdirectory. To build a new Installer package, open the project file and hit 'Build'. The resulting file can be distributed for Macs running OS X version 10.5 "Leopard" and above.

Building Package for MacPorts

Note, this relies on

Portfile can be found under the data/Macports. You have to:

  1. Bump version number in Portfile's version field
  2. Provide correct checksums of .tar.gz file (md5, sha1, rmd160). You can check them by running md5 sympy-x.x.x.tar.gz, openssl sha1 sympy-x.x.x.tar.gz, openssl sympy-x.x.x3.tar.gz
  3. Submit ticket to

##How to Make New 64-bit Release of SymPy for Windows

The Windows SymPy binary("sympy-0.7.1.win32.exe") doesn't work, when the user using 64-bit Python release.

When try to install SymPy he get an error message: "No Python information found in the registry".

That's because "python-2.7.2.amd64.msi" installer put his regystry file in:


but "sympy-0.7.1.win32.exe" binary search it in:


So the user need to install "" witch is the 64-bit version of SymPy

###To Make New 64-bit Installer of SymPy We Need to Have Windows Machine and Then:

cd /path/to/SymPy
python build --plat-name=win-amd64 bdist_wininst

That will create "" in dist directory.

You can't create "" in other machine(linux,mac), because binary creator in them doesn't support "--plat-name" attribute. More information:

Sites to Update

If you don't have privileges to write to any of these, ask Aaron, and he will either give you write access or do it himself.


$ git co sympy-0.7.0
$ python register
$ python sdist upload

You may have to fix the uploaded file by hand over the web, so that it has the same md5sum as the one on googlecode. See also

Make sure it is installable using easy_install and pip. For the documentation to upload for, the zip file you created above won't work, because it is a zip of the directory, and it wants an index.html at the root level. I was able to fix it by selecting everything in the sympy-0.7.0-docs-html directory in the Finder in Mac OS X and right clicking and choosing "Compress", and uploading the file that created. No doubt this could also be done with the command line (if you know how, please update the zip command above to do it).

Release Notes

If you haven't done it already, write up the release notes at Release-Notes-for-0.7.0, replacing "0.7.0" with this version. Use the notes from pervious versions as a guide. Go through the git log and include all important changes from the user perspective (there's no need to document changes that only affect internals). There's no need to be exhaustive against every single change, as there always exists the git log.

It's generally a good idea to enlist the people who made the various changes to write that section of the release notes, especially if you aren't familiar with that code or change.

Put the most important changes up front (at the top). This includes major new functionality and any backwards compatibility breaks.

Other Things

  • Merge the 0.7.0 branch back with master.
  • Delete the 0.7.0 branch.
  • Create a Debian package
  • Create a SymPy spkg Sage package. See, which is kind of outdated. You can get a more up-to-date guide from the current Sage spkg. See
  • Send an email to the list. Include a copy of the release notes and the list of people who contributed to the release.
  • Make sure that there are milestone labels in the issue tracker for at least two versions in the future. So if 0.7.0 is the most recently released version, make sure there are Milestone-release0.7.1 and Milestone-release0.7.2 labels.
  • Make sure any issues in the issue tracker that were fixed by the release are closed (this should not be done until the 0.7.0 branch is merged with master).

GCI Task :: Package the latest version of SymPy for the major distribution : OpenSUSE

What have I done:

  • I used SUSE Studio (because using it will become very easy)
  • I used SymPy 0.7.1 (and add the installer for linux at /sympy-installer directory
  • I've included Python there, so you just need to install the SymPy
  • I've built the package in 2 formats: Live CD / DVD (.iso) and VM Ware / VirtualBox / KVM (.vmdk)

That way is easier, and can be done by anyone.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.