Building a release

(Difference between revisions)
Jump to: navigation, search
(Updating version numbers (including the tutorial))
(The instructions proper: Bugzilla -> RedMine)
(37 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
Build Biopython in 21 easy steps!!
 
Build Biopython in 21 easy steps!!
 +
 +
 +
==Setup required for a new release manager==
 +
 +
The instructions below require that you have access to a few servers and the code repository. When you start, be sure to have access to:
 +
 +
1. Write access to the github biopython repo.
 +
 +
2. biopython.org aka cloudportal.open-bio.org. You need to have write access to write the API and the source tarballs and Windows installers (might require 2 different operations) under the DIST folder.
 +
 +
3. Wordpress news.open-bio.org with posting permissions.
 +
 +
4. pypi - associated with Biopython.
 +
 +
5. Writing permissions on the wiki page.
 +
 +
If you don't have any of the above, please ask.
 +
 +
==The instructions proper==
 +
 +
These instructions are for a Unix machine, with a Windows machine also needed to test and prepare the Windows installers.
  
 
1. make sure I have the latest code
 
1. make sure I have the latest code
     drevil:~biopython> cvs update -P -d
+
     drevil:~biopython> git pull origin master
  
 
2. bump version numbers:
 
2. bump version numbers:
 
* Biopython version - edit  Bio/__init__.py
 
* Biopython version - edit  Bio/__init__.py
 
* Biopython Tutorial - update the date/version line in the Doc/Tutorial.tex file
 
* Biopython Tutorial - update the date/version line in the Doc/Tutorial.tex file
* Martel version - edit Martel/__init__.py (kept in sync with the Biopython version)
+
* Make sure to commit the modified files to github.
* Make sure to commit the modified files to CVS.
+
  
 
3. make sure the README file is still up to date
 
3. make sure the README file is still up to date
  
4. add any important info to NEWS or DEPRECATED - you can get a log of recent CVS changes like this (adjust the date accordingly):
+
4. add any important info to NEWS or DEPRECATED - you can get a log of recent git changes like this (adjust the date accordingly):
     > cvs log -b -N -S -d'>2008-09-08'
+
     git log --since="2009/08/30" --reverse --pretty="medium"
 
+
   
 
5. make sure CONTRIB still current
 
5. make sure CONTRIB still current
  
6. make sure setup.py still up to date
+
6. make sure setup.py is still up to date
 
* Are there any new modules which should get installed?
 
* Are there any new modules which should get installed?
 
* You don't need to update version in setup.py itself (this is now done in Bio/__init__.py as described above)
 
* You don't need to update version in setup.py itself (this is now done in Bio/__init__.py as described above)
Line 23: Line 43:
 
7. do last check to make sure things are checked in
 
7. do last check to make sure things are checked in
 
     > rm -r build
 
     > rm -r build
    > rm Martel/*.pyc
 
 
     > rm Tests/*.pyc
 
     > rm Tests/*.pyc
 
     > make clean -C Doc
 
     > make clean -C Doc
     > cvs update -P -d
+
     > git status
  
 
8. build Biopython and do last regression test
 
8. build Biopython and do last regression test
 
     drevil:~biopython> python setup.py build  
 
     drevil:~biopython> python setup.py build  
     drevil:~biopython> python setup.py install
+
     drevil:~biopython> python setup.py test
     drevil:~biopython/Tests> python run_tests.py
+
 
 +
Ideally do this with a clean checkout on your Windows machine too.  Assuming you have setup your compilers etc appropriately just do this:
 +
 
 +
     C:\python26\python setup.py build
 +
    C:\python26\python setup.py test
 +
 
 +
    C:\python27\python setup.py build
 +
    C:\python27\python setup.py test
 +
 
 +
    C:\python33\python setup.py build
 +
    C:\python33\python setup.py test
 +
 
 +
 
 +
If you are using MinGW, do not forget to add  --compiler=mingw32 (or make it the default on distutils, see the step on building on windows machines). Also If you are using a modern MinGW compiler, then distutils of Python will use an option (-mno-cywgin) that is deprecated and will break gcc. A possible solution is to [http://bugs.python.org/issue12641 edit distutils]
 +
 
 +
Running the tests simultaneously is risky, as two threads may both try and read/write to the same temp files.
  
 
9. check out clean version somewhere else
 
9. check out clean version somewhere else
     drevil:~tmp1/> cvs -d :ext:jchang@pub.open-bio.org:/home/repository/biopython checkout biopython  
+
     drevil:~tmp1/> git clone git://github.com/biopython/biopython.git
 +
    drevil:~tmp1/> cd biopython
  
 
10. make documentation PDF, text and HTML files in Doc
 
10. make documentation PDF, text and HTML files in Doc
     > make clean -C Doc
+
     drevil:~biopython> cd Doc
 +
    drevil:~biopython/Doc> make
 +
    drevil:~biopython/Doc> make clean
 +
    drevil:~biopython/Doc> cd ..
  
 
11. make MANIFEST. First, make sure MANIFEST.in up to date.
 
11. make MANIFEST. First, make sure MANIFEST.in up to date.
 
     > python setup.py sdist --manifest-only  
 
     > python setup.py sdist --manifest-only  
  
12. make sure the regression tests run here
+
12. make the source distribution
    drevil:~tmp1/biopython/Tests/> python run_tests.py
+
 
+
13. make the source distribution
+
 
     drevil:~tmp1/biopython> python setup.py sdist --formats=gztar,zip  
 
     drevil:~tmp1/biopython> python setup.py sdist --formats=gztar,zip  
  
14. untar the file somewhere else
+
13. untar the file somewhere else
     drevil:~tmp2> tar -xzvf ../tmp1/biopython/dist/biopython-1.00a1.tar.gz
+
     drevil:~tmp2> tar -xzvf ../tmp1/biopython/dist/biopython-1.53.tar.gz
* Check to make sure it includes Martel
+
 
* Check to make sure it includes the HTML and PDF files under Doc
 
* Check to make sure it includes the HTML and PDF files under Doc
  
15. make sure I can build and test it
+
14. make sure I can build and test it
     drevil:~tmp2/biopython-1.00a1/> python setup.py build
+
     drevil:~tmp2/biopython-1.53/> python setup.py build
     drevil:~tmp2/biopython-1.00a1/> python setup.py test
+
     drevil:~tmp2/biopython-1.53/> python setup.py test
     drevil:~tmp2/biopython-1.00a1/> python setup.py install --root .  
+
     drevil:~tmp2/biopython-1.53/> python setup.py install --root .  
 +
 
 +
15. Update API documentation using Epydoc (this can often report otherwise overlooked errors).
 +
* Go to the /usr/local/lib/python2.6/site-packages (or equivalent) directory. Running epydoc in your git tree works, but can miss some packages due to import errors.
 +
    epydoc -v -o ~/api -u http://biopython.org -n Biopython --docformat plaintext Bio BioSQL
 +
* Move the generated ~/api directory to replace /home/websites/biopython.org/html/static/DIST/docs/api/ on biopython.org (aka cloudportal.open-bio.org).
 +
 
 +
16. add git tag
 +
    drevil:~biopython> git tag biopython-159
 +
    drevil:~biopython> git push origin master --tags
 +
 
 +
17. On your windows machine, build the Windows installers (either from a clean checkout, or the an unzipped copy of the source code bundle made earlier).  Build the installers first, if you do a build/test/install before hand you seem to get a bloated setup exe.  Assuming you have setup your compilers etc appropriately just do this:
 +
 
 +
    C:\python26\python setup.py bdist_wininst
 +
    C:\python27\python setup.py bdist_wininst
 +
    C:\python33\python setup.py bdist_wininst
 +
 
 +
 
 +
If you are using MinGW, you will have to make distutils use it (it will use a MS compiler by default). Here (contrary to the build step) you cannot pass the compiler as a parameter. The best solution might be to [http://stackoverflow.com/questions/3297254/how-to-use-mingws-gcc-compiler-when-installing-python-package-using-pip configure distutils]
  
16. add CVS tag
+
18. Remove any prior Biopython installations on your windows machine, and confirm the Windows installers work.
    drevil:~biopython> cvs tag biopython-100a1
+
  
17. Update API documentation using Epydoc.
+
19. scp or ftp the .tar.gz, .zip and Windows installer files to the Biopython website, folder /home/websites/biopython.org/html/static/DIST/ on biopython.org (aka cloudportal.open-bio.org).
* Go to the /usr/local/lib/python2.4/site-packages (or equivalent) directory. Running epydoc in your CVS tree works, but can miss some packages due to import errors.
+
    epydoc -o api -u http://biopython.org -n Biopython --docformat plaintext Bio BioSQL Martel
+
* Move the generated api directory to replace /home/websites/biopython.org/html/static/DIST/docs/api/ on biopython.org (aka portal.open-bio.org).
+
  
18. scp or ftp the .tar.gz, .zip and Windows installer files to the Biopython website, folder /home/websites/biopython.org/html/static/DIST/ on biopython.org (aka portal.open-bio.org).
+
20. Upload to the python package index (except for beta/alpha level releases):
  
19. update the [[website]]:
+
    > python setup.py register sdist upload
* add to [[Main_Page|main page]] and [[Download|downloads page]] (through the wiki)
+
* post the announcement on [http://news.open-bio.org news.open-bio.org] (which will update the [[News|news page]] via the news feed)
+
* make sure links work
+
* add the new version to [http://bugzilla.open-bio.org/ Bugzilla]
+
  
20. clean up the tmp directories I made
+
You need to have a login on pypi and be registered with Biopython to be able to upload the new version.
  
21. send email to biopython@biopython.org and biopython-announce@biopython.org (see [[Mailing_lists|mailing lists]])
+
21. Update the website and announce the release:
 +
* add to [[Main_Page|main page]] and [[Download|downloads page]] (through the wiki), make sure the links work
 +
* post the announcement on [http://news.open-bio.org news.open-bio.org] (which will update the [[News|news page]] and [http://twitter.com/Biopython twitter] via the news feed)
 +
* add the new version to [https://redmine.open-bio.org/projects/biopython RedMine]
 +
* send email to biopython@biopython.org and biopython-announce@biopython.org (see [[Mailing_lists|mailing lists]])

Revision as of 17:15, 12 November 2013

Build Biopython in 21 easy steps!!


Setup required for a new release manager

The instructions below require that you have access to a few servers and the code repository. When you start, be sure to have access to:

1. Write access to the github biopython repo.

2. biopython.org aka cloudportal.open-bio.org. You need to have write access to write the API and the source tarballs and Windows installers (might require 2 different operations) under the DIST folder.

3. Wordpress news.open-bio.org with posting permissions.

4. pypi - associated with Biopython.

5. Writing permissions on the wiki page.

If you don't have any of the above, please ask.

The instructions proper

These instructions are for a Unix machine, with a Windows machine also needed to test and prepare the Windows installers.

1. make sure I have the latest code

   drevil:~biopython> git pull origin master

2. bump version numbers:

  • Biopython version - edit Bio/__init__.py
  • Biopython Tutorial - update the date/version line in the Doc/Tutorial.tex file
  • Make sure to commit the modified files to github.

3. make sure the README file is still up to date

4. add any important info to NEWS or DEPRECATED - you can get a log of recent git changes like this (adjust the date accordingly):

   git log --since="2009/08/30" --reverse --pretty="medium"
   

5. make sure CONTRIB still current

6. make sure setup.py is still up to date

  • Are there any new modules which should get installed?
  • You don't need to update version in setup.py itself (this is now done in Bio/__init__.py as described above)

7. do last check to make sure things are checked in

   > rm -r build
   > rm Tests/*.pyc
   > make clean -C Doc
   > git status

8. build Biopython and do last regression test

   drevil:~biopython> python setup.py build 
   drevil:~biopython> python setup.py test

Ideally do this with a clean checkout on your Windows machine too. Assuming you have setup your compilers etc appropriately just do this:

   C:\python26\python setup.py build
   C:\python26\python setup.py test
   C:\python27\python setup.py build
   C:\python27\python setup.py test
   C:\python33\python setup.py build
   C:\python33\python setup.py test


If you are using MinGW, do not forget to add --compiler=mingw32 (or make it the default on distutils, see the step on building on windows machines). Also If you are using a modern MinGW compiler, then distutils of Python will use an option (-mno-cywgin) that is deprecated and will break gcc. A possible solution is to edit distutils

Running the tests simultaneously is risky, as two threads may both try and read/write to the same temp files.

9. check out clean version somewhere else

   drevil:~tmp1/> git clone git://github.com/biopython/biopython.git
   drevil:~tmp1/> cd biopython

10. make documentation PDF, text and HTML files in Doc

   drevil:~biopython> cd Doc
   drevil:~biopython/Doc> make
   drevil:~biopython/Doc> make clean
   drevil:~biopython/Doc> cd ..

11. make MANIFEST. First, make sure MANIFEST.in up to date.

   > python setup.py sdist --manifest-only 

12. make the source distribution

   drevil:~tmp1/biopython> python setup.py sdist --formats=gztar,zip 

13. untar the file somewhere else

   drevil:~tmp2> tar -xzvf ../tmp1/biopython/dist/biopython-1.53.tar.gz
  • Check to make sure it includes the HTML and PDF files under Doc

14. make sure I can build and test it

   drevil:~tmp2/biopython-1.53/> python setup.py build
   drevil:~tmp2/biopython-1.53/> python setup.py test
   drevil:~tmp2/biopython-1.53/> python setup.py install --root . 

15. Update API documentation using Epydoc (this can often report otherwise overlooked errors).

  • Go to the /usr/local/lib/python2.6/site-packages (or equivalent) directory. Running epydoc in your git tree works, but can miss some packages due to import errors.
   epydoc -v -o ~/api -u http://biopython.org -n Biopython --docformat plaintext Bio BioSQL
  • Move the generated ~/api directory to replace /home/websites/biopython.org/html/static/DIST/docs/api/ on biopython.org (aka cloudportal.open-bio.org).

16. add git tag

   drevil:~biopython> git tag biopython-159
   drevil:~biopython> git push origin master --tags

17. On your windows machine, build the Windows installers (either from a clean checkout, or the an unzipped copy of the source code bundle made earlier). Build the installers first, if you do a build/test/install before hand you seem to get a bloated setup exe. Assuming you have setup your compilers etc appropriately just do this:

   C:\python26\python setup.py bdist_wininst
   C:\python27\python setup.py bdist_wininst
   C:\python33\python setup.py bdist_wininst


If you are using MinGW, you will have to make distutils use it (it will use a MS compiler by default). Here (contrary to the build step) you cannot pass the compiler as a parameter. The best solution might be to configure distutils

18. Remove any prior Biopython installations on your windows machine, and confirm the Windows installers work.

19. scp or ftp the .tar.gz, .zip and Windows installer files to the Biopython website, folder /home/websites/biopython.org/html/static/DIST/ on biopython.org (aka cloudportal.open-bio.org).

20. Upload to the python package index (except for beta/alpha level releases):

   > python setup.py register sdist upload

You need to have a login on pypi and be registered with Biopython to be able to upload the new version.

21. Update the website and announce the release:

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox