Abjad build checklist:

 1. Open docs/chapters/start_here/versions/index.rst.
    Run "svn log --limit 30 | less" (or 40 or whatever) and read output.
    Or run "svn log --revision 4083:4977" and read output in chronological order.
    Edit docs/chapters/start_here/versions/index.rst as appropriate.
    List new features and functionality.
    Highlight significant new functionality with a musical example.
    Begin entries with an active verb in the simple past.
    Order entries by leading verb.
    List adds first and extensions second.
    List changes in user syntax last.

 2. Open doc/chapters/start_here/abjad/index.rst.
    Run "scr/devel/count-tools" and "scr/devel/count-source-lines".
    Added a sentence detailing the output of these scripts to this chapter.

 3. Commit.

 4. Edit abjad/__init__.py and increment '__version__'.

 5. Edit cfg/cfg.py and increment 'abjad_version_number'.

 6. Edit tools/configurationtools/get_abjad_version_string.py and change the
    version number string given in the docstring.

 7. Edit docs/conf.py and increment 'version' and 'release'.

 8. Run abj-rmpycs. Then run py.test.
    If any tests break, fix and repeat this step.

 9. Change to abjad/tools and run the following three scripts:
    replace-abjad-prompts-with-python-prompts
    run-doctest-on-all-modules-in-tree
    replace-python-prompts-with-abjad-prompts
    If any tests break, fix and go back to (8.)

10. Change to abjad/docs and run 'make clean'.
    (This step is important. Failing to 'make clean' before building
    the docs can cause the doc tarball made below to exceed 10 megs.
    PyPI rejects doc tarballs greater than 10 megs.)

11. Run make-abjad-api. If any errors occur, fix and go back to (8.)

12. Run 'make latex'. If any errors occur, fix and go back to (8.)

13. Change to docs/_build/latex and run 'make all-pdf'.
    If any errors occur, fix and go back to (8.)
    Open the docs/_build/latex/Abjad.pdf file that results.
    Click around some to make sure everything looks OK.

14. Copy docs/_build/latex/Abjad.pdf to docs/pdf/Abjad-x-y.pdf.
    Do this with 'cp' and not with 'svn cp'.

15. Add docs/pdf/Abajd-x-y.pdf to svn.

16. Remove docs/pdf/Abjad-x-(y-1).pdf from svn.

17. Change to abjad/trunk.

18. Edit setup.py and increment the 'version' string found there.

19. Run "svn info"
    Note the current revision of the working copy from which you are building.
    Open docs/chapters/start_here/versions/index.rst again.
    Check the build revision indicated there.
    Make sure the build revision equals current revision + 1.

20. Commit.

21. Run 'python setup.py sdist'.
    If any errors occur, fix and go back to (8.)

22. Run 'python setup.py register sdist upload'
    Follow the login instructions provided by PyPI.
    (Important. There is a bug in setup.py identified on the Internet.
    After you first register with PyPI you must view ~/.pypirc
    and change the line '[pypi]' to '[server-login]'. If you do
    not do this then this step will fail.)
    (Also important. It appears that this bug is fixed under Python 2.7.
    If you build under Python 2.7 leave the line '[pypi]' as is.
    Do not change this line to '[server-login]'.)
    You must have Abjad package owner credentials for this step to work.
    If you need Abjad package owner credentials, talk to Trevor or Victor.
    PyPI will respond with "Server response (200): OK".

23. Remove 'dist' and 'Abjad.egg-info'.
    The directories are no longer needed after upload to PyPI.
    The directories should not be checked into the Abjad repository.

24. Change to docs/_build/html and archive all 9 or 10 files and subdirectories therein.
    You must create a single archive of all 9 or 10 files.
    Through the Finder on the Mac you can shift-click all 9 or 10 files,
    then control-click the selected files and choose "Compress 9 items"
    from the context menu that appears.
    (Note that archiving just the docs/_build/html folder will not work.)
    Name the archive Archive.zip.
    Check the size of the archive.
    The archive must be less than 10 megs.

25. Log in to The PyPI website at pypi.python.org with Abjad owner credentials.
    Click on the Abjad link to edit PyPI's information about the package.

26. At the bottom of the "Package 'Abjad' Editing" page, click on "Choose file"
    and select docs/_build/html/Archive.zip. Then click on "Upload Documentation".
    PyPI will redirect to http://packages.python.org/Abjad/ and the newest version
    of the docs will appear. If it doesn't, debug and fix what went wrong.

27. Click your browser's "back" button to return to the "Package 'Abjad' Editing" page.
    Then click on the "edit" link to the left of the entry for the new x.y version.
    This will take you to the "Submitting package information" page.

28. Manually restore the diacritics in "Víctor Adán" and "Trevor Bača" in the "Author" field.
    (This is necessary because there's a bug in setup.py that fails on UNICODE metadata.
    So UNICODE characters must be added back in by hand on this page of the PyPI website
    rather than being more conveniently read from abjad/trunk/setup.py.)
    ("Josiah Oberholtzer" transmits fine here and doesn't have to be tweaked.)

29. Manually restore the spaces after each of the keyword phrases in
    "music composition, music notation, formalized score control, lilypond"
    in the "Keywords" field. (Again, setup.py mangles these on upload to PyPI.)

30. Click the "Add information" button at the bottom of the page to confirm.
    All PyPI editing and uploading is now complete.

31. Click around PyPI to make sure everything looks correct.
    Then leave PyPI.
    
32. Return to your Abjad sources and remove docs/_build/html/Archive.zip.
    The archive should not be checked in to the Abjad repository.

33. Author release announcement and mail to abjad-user@googlegroups.com.
    Release announcement should recapitulate version history.
    
[2011-08-21, 2011-08-30, 2011-09-12, 2011-09-22, 2012-01-29, 2012-02-27]
