Building an NLTK distribution
----------------------------------

1. Testing
   - Check no errors are reported in our continuous integration service:
     https://github.com/nltk/nltk/actions
   - Optionally test demonstration code locally
     make demotest
   - Optionally test individual modules:
     tox-3.8 -e py38 nltk.package.module
   - Check the data index is up-to-date:
     cd ../nltk_data; make; push

2. Update Version Number and ChangeLog
   - Update version number
     edit nltk/VERSION and web/conf.py (version and release)
   - Check web/install.rst mentions latest version of Python
   - Check setup.py lists correct range of Python versions
   - Add a new entry to the news page in nltk/web/news.rst
   - Update the ChangeLog (for nltk, nltk_data)
     git log "$(git describe --tags --abbrev=0)..HEAD" --oneline
     edit ChangeLog

3. Build Documentation
   - Check the copyright year is correct and update if necessary
     e.g. ./tools/global_replace.py 2001-2022 2001-2022
     check web/conf.py copyright line
   - Check that installation instructions are up-to-date
     (including the range of Python versions that are supported)
     edit web/install.rst setup.py
   - Ensure that nltk_theme is installed and updated
     pip install -U nltk_theme
   - Rebuild the API docs
     sphinx-build -E ./web ./build
   - Publish them
     cd ../nltk.github.com; git pull (begin with current docs repo)
     cp -r ../nltk/build/* .
     git add .
     git commit -m "updates for version 3.X.Y"
     git push origin master

4. Create a new version
   - Tag this version:
     cd ../nltk
     git tag -a 3.X.Y -m "version 3.X.Y"
     git push --tags
     verify that it shows up here: https://github.com/nltk/nltk/releases
     This is important for the website, as the footer will link to the
     tag with the version from web/conf.py.

5. Release
   - Make the distributions
     make clean; make dist; ls dist/
   - Upload the distributions
     python -m twine upload dist/*
   - Check upload
     https://pypi.python.org/pypi/nltk

6. Announce
   - Post announcement to NLTK the mailing lists:
     nltk-dev (for beta releases)
     nltk-users (for final releases)
     nltk twitter account

7. Optionally update repo version
   - we don't want builds from the repository to have the same release number
     e.g. after release X.Y.4, update repository version to X.Y.5a (alpha)


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@ BOOK BUILD
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

The build requires docutils, pdflatex, python imaging library, epydoc,
  cdrtools, ImageMagick

  1. Check out a clean copy of the subversion repository (or make clean)
     and install locally with sudo python setup.py install; make clean
  2. make doc (slow; see doc/ for the results) and commit
