Skip to content

Commit 965ecfc

Browse files
committed
DOC: updating release instructions for buildbots
Making various checks and binary builds via buildbots.
1 parent ee97500 commit 965ecfc

File tree

2 files changed

+44
-147
lines changed

2 files changed

+44
-147
lines changed

doc/devel/guidelines/make_release.rst

Lines changed: 43 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Release checklist
7272

7373
* Do a final check on the `nipy buildbot`_
7474

75-
* If you have travis-ci_ building set up you might want to push the code in it's
75+
* If you have travis-ci_ building set up you might want to push the code in its
7676
current state to a branch that will build, e.g::
7777

7878
git branch -D pre-release-test # in case branch already exists
@@ -84,61 +84,50 @@ Release checklist
8484

8585
./tools/nicythize
8686

87-
* Compile up the code for testing::
87+
Release checking - buildbots
88+
============================
8889

89-
python setup.py build_ext -i
90+
* Check all the buildbots pass
91+
* Run the builder and review the possibly green output from
92+
http://nipy.bic.berkeley.edu/builders/nipy-release-checks
9093

91-
* Make sure all tests pass (from the nipy root directory)::
92-
93-
./tools/nipnost nipy
94-
95-
* Clean::
94+
This runs all of::
9695

9796
make distclean
98-
99-
* Make sure all tests pass from sdist::
100-
97+
python -m compileall .
10198
make sdist-tests
102-
103-
and bdist_egg::
104-
10599
make bdist-egg-tests
100+
make check-version-info
101+
make check-files
106102

107-
This one may well fail because of a problem with the script tests; if you have
108-
a recent (>= Jan 15 2013) nibabel ``nisext`` package, you could try instead
109-
doing::
103+
* You need to review the outputs for errors; at the moment this buildbot builder
104+
does not check whether these tests passed or failed.
105+
* ``make bdist-egg-tests`` may well fail because of a problem with the script
106+
tests; if you have a recent (>= Jan 15 2013) nibabel ``nisext`` package, you
107+
could try instead doing::
110108

111109
python -c 'from nisext.testers import bdist_egg_tests; bdist_egg_tests("nipy", label="not slow and not script_test")'
112110

113111
Eventually we should update the ``bdist-egg-tests`` makefile target.
114-
115-
* Check the installation commit hash storage.
116-
117-
This checks the three ways of installing (from tarball, repo, local in repo)::
118-
119-
make check-version-info
120-
121-
The last may not raise any errors, but you should detect in the output
122-
lines of this form::
112+
* ``make check-version-info`` checks how the commit hash is stored in the
113+
installed files. You should see something like this::
123114

124115
{'sys_version': '2.6.6 (r266:84374, Aug 31 2010, 11:00:51) \n[GCC 4.0.1 (Apple Inc. build 5493)]', 'commit_source': 'archive substitution', 'np_version': '1.5.0', 'commit_hash': '25b4125', 'pkg_path': '/var/folders/jg/jgfZ12ZXHwGSFKD85xLpLk+++TI/-Tmp-/tmpGPiD3E/pylib/nipy', 'sys_executable': '/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python', 'sys_platform': 'darwin'}
125116
/var/folders/jg/jgfZ12ZXHwGSFKD85xLpLk+++TI/-Tmp-/tmpGPiD3E/pylib/nipy/__init__.pyc
126117
{'sys_version': '2.6.6 (r266:84374, Aug 31 2010, 11:00:51) \n[GCC 4.0.1 (Apple Inc. build 5493)]', 'commit_source': 'installation', 'np_version': '1.5.0', 'commit_hash': '25b4125', 'pkg_path': '/var/folders/jg/jgfZ12ZXHwGSFKD85xLpLk+++TI/-Tmp-/tmpGPiD3E/pylib/nipy', 'sys_executable': '/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python', 'sys_platform': 'darwin'}
127118
/Users/mb312/dev_trees/nipy/nipy/__init__.pyc
128119
{'sys_version': '2.6.6 (r266:84374, Aug 31 2010, 11:00:51) \n[GCC 4.0.1 (Apple Inc. build 5493)]', 'commit_source': 'repository', 'np_version': '1.5.0', 'commit_hash': '25b4125', 'pkg_path': '/Users/mb312/dev_trees/nipy/nipy', 'sys_executable': '/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python', 'sys_platform': 'darwin'}
129120

130-
* Check the ``setup.py`` file is picking up all the library code and scripts,
131-
with::
132-
133-
make check-files
134-
135-
Look for output at the end about missed files, such as::
121+
* ``make check-files`` checks if the source distribution is picking up all the
122+
library and script files. Look for output at the end about missed files, such
123+
as::
136124

137125
Missed script files: /Users/mb312/dev_trees/nipy/bin/nib-dicomfs, /Users/mb312/dev_trees/nipy/bin/nifti1_diagnose.py
138126

139127
Fix ``setup.py`` to carry across any files that should be in the distribution.
140-
141-
* You probably have virtualenvs for different python versions. Check the tests
128+
* Check the documentation doctests pass from
129+
http://nipy.bic.berkeley.edu/builders/nipy-doc-builder
130+
* You may have virtualenvs for different python versions. Check the tests
142131
pass for different configurations. If you have pytox_ and a network
143132
connection, and lots of pythons installed, you might be able to do::
144133

@@ -166,36 +155,8 @@ Release checklist
166155

167156
etc for the different virtualenvs.
168157

169-
* Check on different platforms, particularly windows and PPC. I have wine
170-
installed on my Mac, and git bash installed under wine. I run bash and the
171-
tests like this::
172-
173-
wineconsole bash
174-
# in wine bash
175-
make sdist-tests
176-
177-
For the PPC I have to log into a MacPro in Berkeley at
178-
``alexis.bic.berkeley.edu``. Here's an example session::
179-
180-
ssh alexis.bic.berkeley.edu
181-
cd dev_trees/nipy
182-
git co main-master
183-
git pull
184-
make sdist-tests
185-
186-
* Check the documentation doctests::
187-
188-
cd doc
189-
make doctest
190-
cd ..
191-
192-
You will need an importable version of NIPY on the python path to do this
193-
check.
194-
195-
* Check everything compiles without syntax errors::
196-
197-
make distclean
198-
python -m compileall .
158+
Doing the release
159+
=================
199160

200161
* The release should now be ready.
201162

@@ -226,81 +187,32 @@ Release checklist
226187
python setup.py register
227188
python setup.py sdist --formats=gztar,zip upload
228189

229-
* Then upload the binary release for the platform you are currently on::
230-
231-
python setup.py bdist_egg upload
232-
233-
* Do binary builds for any virtualenvs you have::
234-
235-
workon python25
236-
python setup.py bdist_egg upload
237-
deactivate
238-
239-
etc. (``workon`` is a virtualenvwrapper command).
240-
241-
For OSX and python 2.5 only, the installation didn't recognize it was doing a fat (i386 + PPC)
242-
build, and build with name ``dipy-0.5.0-py2.5-macosx-10.3-i386.egg``. I tried
243-
to tell it to use ``fat`` and ``universal`` in the name, but uploading these
244-
tp pypi didn't result in in easy_install finding them. In the end did the
245-
standard::
246-
247-
python setup.py bdist_egg upload
248-
249-
which uploaded the 'i386' egg, followed by::
190+
* Trigger binary builds for Windows from the buildbots. See builders
191+
``nipy-bdist32-26``, ``nipy-bdist32-27``, ``nipy-bdist32-32``. The ``exe``
192+
builds will appear in http://nipy.bic.berkeley.edu/nipy-dist . Download the
193+
builds and upload to pypi.
250194

251-
python setup.py bdist_egg --plat-name macosx-10.3-ppc upload
195+
* Trigger binary builds for OSX from the buildbots ``nipy-bdist-mpkg-2.6``,
196+
``nipy-bdist-mpkg-2.7``, ``nipy-bdist-mpkg-3.3``. ``egg`` and ``mpkg`` builds
197+
will appear in http://nipy.bic.berkeley.edu/nipy-dist . Download the eggs and
198+
upload to pypi.
252199

253-
which may or may not work to allow easy_install to find the egg for PPC. It
254-
does work for easy_install on my Intel machine. I found the default platform
255-
name with ``python setup.py bdist_egg --help``.
200+
* Download the ``mpkg`` builds, maybe with::
256201

257-
When trying to upload in python25, after previously saving my ``~/.pypirc``
258-
during the initial ``register`` step, I got a configparser error. I found
259-
`this python 2.5 pypirc page
260-
<http://docs.python.org/release/2.5.2/dist/pypirc.html>`_ and so hand edited
261-
the ``~/.pypirc`` file to have a new section::
202+
scp -r buildbot@nipy.bic.berkeley.edu:nibotmi/public_html/nipy-dist/*.mpkg .
262203

263-
[server-login]
264-
username:my-username
265-
password:my-password
266-
267-
after which python25 upload seemed to go smoothly.
268-
269-
* Building OSX dmgs. This is very unpleasant.
270-
271-
See `MBs OSX setup
272-
<http://matthew-brett.github.com/pydagogue/develop_mac.html>`_).
273-
274-
The problem here is that we need to run the package build as root, so that the
275-
files have root permissions when installed from the installer. We also can't
276-
use virtualenvs, because the installer needs to find the correct system path
277-
into which to install - so the python ``sys.prefix`` has to be e.g.
278-
``/Library/Frameworks/Python.framework/Versions/2.6``. What I ended up doing
279-
was to make a script to set paths etc from a handy virtualenv, but run the
280-
relevant system python, as root. See the crude, fragile ``tools/pythonsudo``
281-
bash script for details. The procedure then::
282-
283-
sudo ./tools/pythonsudo 5
284-
make clean
285-
python tools/osxbuild.py
286-
287-
The ``osxbuild.py`` script comes from numpy and uses the ``bdist_mpkg`` script
288-
we might have installed above.
204+
Make sure you have `github bdist_mpkg`_ installed, for the root user. For
205+
each ``mpkg`` directory, run::
289206

290-
* Repeat binary builds for Linux 32, 64 bit and OS X.
207+
sudo reown_mpkg nipy-0.3.0.dev-py2.6-macosx10.6.mpkg root admin
208+
zip -r nipy-0.3.0.dev-py2.6-macosx10.6.mpkg.zip nipy-0.3.0.dev-py2.6-macosx10.6.mpkg
291209

292-
* Get to a windows machine and do egg and wininst builds::
210+
Upload the ``mpkg.zip`` files. (At the moment, these don't seem to store the
211+
scripts - needs more work)
293212

294-
make distclean
295-
c:\Python26\python.exe setup.py bdist_egg upload
296-
c:\Python26\python.exe setup.py bdist_wininst --target-version=2.6 register upload
297-
298-
Maybe virtualenvs for the different versions of python? I haven't explored
299-
that yet.
213+
* Tag the release with tag of form ``0.3.0``::
300214

301-
* Tag the release with tag of form ``1.1.0``::
302-
303-
git tag -am 'Second main release' 1.1.0
215+
git tag -am 'Second main release' 0.3.0
304216

305217
* Now the version number is OK, push the docs to sourceforge with::
306218

@@ -341,22 +253,6 @@ Release checklist
341253

342254
git push --tags
343255

344-
* Make next development release tag
345-
346-
After each release the master branch should be tagged
347-
with an annotated (or/and signed) tag, naming the intended
348-
next version, plus an 'upstream/' prefix and 'dev' suffix.
349-
For example 'upstream/1.0.0.dev' means "development start
350-
for upcoming version 1.0.0.
351-
352-
This tag is used in the Makefile rules to create development snapshot
353-
releases to create proper versions for those. The version derives its name
354-
from the last available annotated tag, the number of commits since that, and
355-
an abbreviated SHA1. See the docs of ``git describe`` for more info.
356-
357-
Please take a look at the Makefile rules ``devel-src``,
358-
``devel-dsc`` and ``orig-src``.
359-
360256
* Announce to the mailing lists.
361257

362258
.. _pytox: http://codespeak.net/tox

doc/links_names.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
.. _old and new python versions: https://launchpad.net/%7Efkrull/+archive/deadsnakes
6969
.. _pypi: http://pypi.python.org
7070
.. _example pypi: http://packages.python.org/an_example_pypi_project/setuptools.html#intermezzo-pypirc-file-and-gpg
71+
.. _github bdist_mpkg: https://github.com/matthew-brett/bdist_mpkg
7172

7273
.. Code support stuff
7374
.. _pychecker: http://pychecker.sourceforge.net/

0 commit comments

Comments
 (0)