@@ -13,18 +13,10 @@ A guide for developers who are doing a nibabel release
13
13
Release tools
14
14
=============
15
15
16
- In the :file: `tools ` directory, among other files, you will find the following
17
- utilities::
18
-
19
- tools/
20
- |- build_release
21
- |- release
22
- |- compile.py
23
- |- make_tarball.py
24
- |- toollib.py
25
-
26
- There are also some release utilities in :file: `nisext/testers.py `, with
27
- makefile targets for their use. The relevant targets are::
16
+ There are some release utilities that come with nibabel _. nibabel should
17
+ install these as the ``nisext `` package, and the testing stuff is understandably
18
+ in the ``testers `` module of that package. nibabel has Makefile targets for their
19
+ use. The relevant targets are::
28
20
29
21
make check-version-info
30
22
make sdist-tests
@@ -36,6 +28,14 @@ is working and information parameters are set correctly.
36
28
The second (``sdist-tests ``) makes an sdist source distribution archive,
37
29
installs it to a temporary directory, and runs the tests of that install.
38
30
31
+ If you have a version of nibabel trunk past February 11th 2011, there will also
32
+ be a functional make target::
33
+
34
+ make bdist-egg-tests
35
+
36
+ This builds an egg (which is a zip file), hatches it (unzips the egg) and runs
37
+ the tests from the resulting directory.
38
+
39
39
.. _release-checklist :
40
40
41
41
Release checklist
@@ -55,29 +55,83 @@ Release checklist
55
55
Then manually go over the *git log * to make sure the release notes are
56
56
as complete as possible and that every contributor was recognized.
57
57
58
- * Make sure all tests pass::
58
+ * Check the ``long_description `` in ``nibabel/info.py ``. Check it matches the
59
+ ``README `` in the root directory.
60
+
61
+ * Clean::
59
62
63
+ make distclean
64
+
65
+ * Make sure all tests pass (from the nibabel root directory)::
66
+
67
+ cd ..
68
+ nosetests --with-doctest nibabel
69
+ cd nibabel # back to the root directory
70
+
71
+ * You probably have virtualenvs for different python versions. Check the tests
72
+ pass for different python versions. Here's what that looks like for my
73
+ virtualenv / virtualenvwrapper setup::
74
+
75
+ cd ..
76
+ workon python25
77
+ nosetests --with-doctest nibabel
78
+ deactivate
79
+ workon python27
60
80
nosetests --with-doctest nibabel
81
+ deactivate
82
+ cd nibabel # back to root directory
83
+
84
+ * Check on different platforms, particularly windows and PPC
85
+
86
+ * Check the documentation doctests::
87
+
88
+ cd doc
89
+ make doctest
90
+ cd ..
91
+
92
+ At the moment this generates lots of errors from the autodoc documentation
93
+ running the doctests in the code, where the doctests pass when run in nose -
94
+ we should find out why this is at some point, but leave it for now.
61
95
62
96
* Make sure all tests pass from sdist::
63
97
64
98
make sdist-tests
65
99
66
- * First pass run :file: `build_release ` from the :file: `tools ` directory::
100
+ and bdist_egg::
101
+
102
+ make bdist-egg-tests
67
103
68
- cd tools
69
- ./build_release
104
+ and the three ways of installing (from tarball, repo, local in repo)::
105
+
106
+ make check-version-info
107
+
108
+ The last may not raise any errors, but you should detect in the output
109
+ lines of this form::
110
+
111
+ {'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/nibabel', 'sys_executable': '/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python', 'sys_platform': 'darwin'}
112
+ /var/folders/jg/jgfZ12ZXHwGSFKD85xLpLk+++TI/-Tmp-/tmpGPiD3E/pylib/nibabel/__init__.pyc
113
+ {'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/nibabel', 'sys_executable': '/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python', 'sys_platform': 'darwin'}
114
+ Files not taken across by the installation:
115
+ []
116
+ /Users/mb312/dev_trees/nibabel/nibabel/__init__.pyc
117
+ {'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/nibabel/nibabel', 'sys_executable': '/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python', 'sys_platform': 'darwin'}
70
118
71
119
* The release should now be ready.
72
120
73
121
* Edit :file: `nibabel/info.py ` to set ``_version_extra `` to ``'' ``; commit
74
122
75
- * Once everything looks good, run :file: `release ` from the
76
- :file: `tools ` directory.
123
+ make distclean
124
+ make source-release
125
+
126
+ * Once everything looks good, upload the source release to PyPi. See
127
+ `setuptools intro `_::
128
+
129
+ python setup.py register
130
+ python setup.py sdist --formats=gztar,zip upload
77
131
78
- * Tag the release with tag of form ``1.0 .0 ``::
132
+ * Tag the release with tag of form ``0.5 .0 ``::
79
133
80
- git tag -am 'First public release' 1.0 .0
134
+ git tag -am 'First public release' 0.5 .0
81
135
82
136
* Now the version number is OK, push the docs to sourceforge with::
83
137
@@ -131,3 +185,4 @@ Release checklist
131
185
132
186
* Announce to the mailing lists.
133
187
188
+ .. _setuptools intro : http://packages.python.org/an_example_pypi_project/setuptools.html
0 commit comments