Skip to content

Commit 9831c3c

Browse files
committed
RF - update release instructions and Makefile accordingly
1 parent 3e7f37e commit 9831c3c

File tree

6 files changed

+84
-166
lines changed

6 files changed

+84
-166
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ deb-src: check-debian distclean
222222
bdist_rpm:
223223
$(PYTHON) setup.py bdist_rpm \
224224
--doc-files "doc" \
225-
--packager "nibabel authors <[email protected].org>" \
226-
--vendor "nibabel authors <[email protected].org>"
225+
--packager "nibabel authors <http://mail.scipy.org/mailman/listinfo/nipy-devel>"
226+
--vendor "nibabel authors <http://mail.scipy.org/mailman/listinfo/nipy-devel>"
227227

228228

229229
# build MacOS installer -- depends on patched bdist_mpkg for Leopard
@@ -243,5 +243,12 @@ installed-tests:
243243
sdist-tests:
244244
$(PYTHON) -c 'from nisext.testers import sdist_tests; sdist_tests("nibabel")'
245245

246+
bdist-egg-tests:
247+
$(PYTHON) -c 'from nisext.testers import bdist_egg_tests; bdist_egg_tests("nibabel")'
248+
249+
source-release: clean
250+
python -m compileall .
251+
python setup.py sdist --formats=gztar,zip
252+
246253
.PHONY: orig-src pylint
247254

doc/source/devel/make_release.rst

Lines changed: 75 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,10 @@ A guide for developers who are doing a nibabel release
1313
Release tools
1414
=============
1515

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::
2820

2921
make check-version-info
3022
make sdist-tests
@@ -36,6 +28,14 @@ is working and information parameters are set correctly.
3628
The second (``sdist-tests``) makes an sdist source distribution archive,
3729
installs it to a temporary directory, and runs the tests of that install.
3830

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+
3939
.. _release-checklist:
4040

4141
Release checklist
@@ -55,29 +55,83 @@ Release checklist
5555
Then manually go over the *git log* to make sure the release notes are
5656
as complete as possible and that every contributor was recognized.
5757

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::
5962

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
6080
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.
6195

6296
* Make sure all tests pass from sdist::
6397

6498
make sdist-tests
6599

66-
* First pass run :file:`build_release` from the :file:`tools` directory::
100+
and bdist_egg::
101+
102+
make bdist-egg-tests
67103

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'}
70118

71119
* The release should now be ready.
72120

73121
* Edit :file:`nibabel/info.py` to set ``_version_extra`` to ``''``; commit
74122

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
77131

78-
* Tag the release with tag of form ``1.0.0``::
132+
* Tag the release with tag of form ``0.5.0``::
79133

80-
git tag -am 'First public release' 1.0.0
134+
git tag -am 'First public release' 0.5.0
81135

82136
* Now the version number is OK, push the docs to sourceforge with::
83137

@@ -131,3 +185,4 @@ Release checklist
131185

132186
* Announce to the mailing lists.
133187

188+
.. _setuptools intro: http://packages.python.org/an_example_pypi_project/setuptools.html

tools/build_release

Lines changed: 0 additions & 27 deletions
This file was deleted.

tools/compile.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

tools/release

Lines changed: 0 additions & 52 deletions
This file was deleted.

tools/toollib.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)