Merge lp:~jameinel/bzr/1.17-build-updates into lp:~bzr/bzr/trunk-old

Proposed by John A Meinel
Status: Merged
Approved by: Ian Clatworthy
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~jameinel/bzr/1.17-build-updates
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 177 lines (has conflicts)
Text conflict in NEWS
To merge this branch: bzr merge lp:~jameinel/bzr/1.17-build-updates
Reviewer Review Type Date Requested Status
Ian Clatworthy Approve
Review via email: mp+8753@code.launchpad.net
To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

I'd actually like to propose that this gets merged into bzr.1.17, however that doesn't seem to be mirrored yet on Launchpad.

Anyway, when going to build the win32 installers, I updated build_release.py and ran into some problems with make and generate_docs.py

Martin recently moved the file from . into ./tools, and then updated the Makefile to set PYTHONPATH so that it could still find bzrlib.

However, on Windows you have to do:
  PYTHONPATH=.;$$PYTHONPATH
versus
  PYTHONPATH=.:$$PYTHONPATH

(semicolon versus colon for those who have trouble distinguishing those 2 pixels.)

Anyway, generate_docs.py knows where it exists in the hierarchy, so rather than trying to work out how to write portable Make, I just went ahead and wrote portable python.

I need this on the 1.17 branch in order to build the installers, so it is somewhat time critical.

Revision history for this message
John A Meinel (jameinel) wrote :

Take that back. I'm going to just force this for the 1.17rc1 installer, but we can address this however we want for 1.17 final.

Revision history for this message
Ian Clatworthy (ian-clatworthy) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2009-07-14 07:04:15 +0000
+++ Makefile 2009-07-20 08:36:57 +0000
@@ -176,14 +176,14 @@
176 $(wildcard $(addsuffix /*.txt, bzrlib/help_topics/en)) 176 $(wildcard $(addsuffix /*.txt, bzrlib/help_topics/en))
177177
178doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)178doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
179 PYTHONPATH=.:$$PYTHONPATH $(PYTHON) tools/generate_docs.py -o $@ rstx179 $(PYTHON) tools/generate_docs.py -o $@ rstx
180180
181doc/en/release-notes/NEWS.txt: NEWS181doc/en/release-notes/NEWS.txt: NEWS
182 $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"182 $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
183183
184MAN_PAGES = man1/bzr.1184MAN_PAGES = man1/bzr.1
185man1/bzr.1: $(MAN_DEPENDENCIES)185man1/bzr.1: $(MAN_DEPENDENCIES)
186 PYTHONPATH=.:$$PYTHONPATH $(PYTHON) tools/generate_docs.py -o $@ man186 $(PYTHON) tools/generate_docs.py -o $@ man
187187
188upgrade_guide_dependencies = $(wildcard $(addsuffix /*.txt, doc/en/upgrade-guide)) 188upgrade_guide_dependencies = $(wildcard $(addsuffix /*.txt, doc/en/upgrade-guide))
189189
190190
=== modified file 'NEWS'
--- NEWS 2009-07-20 06:58:15 +0000
+++ NEWS 2009-07-20 08:36:57 +0000
@@ -6,6 +6,7 @@
6.. contents:: List of Releases6.. contents:: List of Releases
7 :depth: 17 :depth: 1
88
9<<<<<<< TREE
910
10In Development11In Development
11##############12##############
@@ -76,6 +77,23 @@
76*********77*********
7778
7879
80=======
81bzr 1.17
82########
83
84Bug Fixes
85*********
86
87* Change an extension to call the python ``frozenset()`` rather than the C
88 api ``PyFrozenSet_New``. It turns out that python2.4 did not expose the
89 C api. (John Arbash Meinel, #399366)
90
91* Fixes for the Makefile and the rename of ``generate_docs.py`` to
92 ``tools/generate_docs.py`` to allow everything to be built on Windows.
93 (John Arbash Meinel, #399356)
94
95
96>>>>>>> MERGE-SOURCE
79bzr 1.17rc1 "So late it's brunch" 2009-07-1397bzr 1.17rc1 "So late it's brunch" 2009-07-13
80############################################98############################################
8199
82100
=== modified file 'bzrlib/_known_graph_pyx.pyx'
--- bzrlib/_known_graph_pyx.pyx 2009-06-19 20:35:35 +0000
+++ bzrlib/_known_graph_pyx.pyx 2009-07-20 08:36:57 +0000
@@ -25,8 +25,6 @@
25 ctypedef struct PyObject:25 ctypedef struct PyObject:
26 pass26 pass
2727
28 object PyFrozenSet_New(object)
29
30 object PyTuple_New(Py_ssize_t n)28 object PyTuple_New(Py_ssize_t n)
31 Py_ssize_t PyTuple_GET_SIZE(object t)29 Py_ssize_t PyTuple_GET_SIZE(object t)
32 PyObject * PyTuple_GET_ITEM(object t, Py_ssize_t o)30 PyObject * PyTuple_GET_ITEM(object t, Py_ssize_t o)
@@ -267,7 +265,7 @@
267 cdef Py_ssize_t pos, last_item265 cdef Py_ssize_t pos, last_item
268 cdef long min_gdfo266 cdef long min_gdfo
269267
270 heads_key = PyFrozenSet_New(keys)268 heads_key = frozenset(keys)
271 maybe_heads = PyDict_GetItem(self._known_heads, heads_key)269 maybe_heads = PyDict_GetItem(self._known_heads, heads_key)
272 if maybe_heads != NULL:270 if maybe_heads != NULL:
273 return <object>maybe_heads271 return <object>maybe_heads
@@ -285,7 +283,7 @@
285 if not candidate_nodes:283 if not candidate_nodes:
286 return frozenset([NULL_REVISION])284 return frozenset([NULL_REVISION])
287 # The keys changed, so recalculate heads_key285 # The keys changed, so recalculate heads_key
288 heads_key = PyFrozenSet_New(candidate_nodes)286 heads_key = frozenset(candidate_nodes)
289 if PyDict_Size(candidate_nodes) < 2:287 if PyDict_Size(candidate_nodes) < 2:
290 return heads_key288 return heads_key
291289
@@ -330,7 +328,7 @@
330 node = <_KnownGraphNode>temp_node328 node = <_KnownGraphNode>temp_node
331 if not node.seen:329 if not node.seen:
332 PyList_Append(heads, node.key)330 PyList_Append(heads, node.key)
333 heads = PyFrozenSet_New(heads)331 heads = frozenset(heads)
334 for pos from 0 <= pos < PyList_GET_SIZE(cleanup):332 for pos from 0 <= pos < PyList_GET_SIZE(cleanup):
335 node = _get_list_node(cleanup, pos)333 node = _get_list_node(cleanup, pos)
336 node.seen = 0334 node.seen = 0
337335
=== modified file 'tools/generate_docs.py'
--- tools/generate_docs.py 2009-06-19 09:27:13 +0000
+++ tools/generate_docs.py 2009-07-20 08:36:57 +0000
@@ -32,12 +32,13 @@
3232
33Run "%(prog)s --help" for the option reference.33Run "%(prog)s --help" for the option reference.
34"""34"""
3535import os
36import bzrlib.commands
37import sys36import sys
38from optparse import OptionParser37from optparse import OptionParser
3938
40from bzrlib import doc_generate39sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
40
41from bzrlib import commands, doc_generate
4142
42def main(argv):43def main(argv):
43 parser = OptionParser(usage="""%prog [options] OUTPUT_FORMAT44 parser = OptionParser(usage="""%prog [options] OUTPUT_FORMAT
@@ -69,8 +70,8 @@
69 if len(args) != 2:70 if len(args) != 2:
70 parser.print_help()71 parser.print_help()
71 sys.exit(1)72 sys.exit(1)
72 73
73 bzrlib.commands.install_bzr_command_hooks()74 commands.install_bzr_command_hooks()
7475
75 infogen_type = args[1]76 infogen_type = args[1]
76 infogen_mod = doc_generate.get_module(infogen_type)77 infogen_mod = doc_generate.get_module(infogen_type)
7778
=== modified file 'tools/win32/build_release.py'
--- tools/win32/build_release.py 2009-06-17 18:11:58 +0000
+++ tools/win32/build_release.py 2009-07-20 08:36:57 +0000
@@ -4,12 +4,12 @@
4# When preparing a new release, make sure to set all of these to the latest4# When preparing a new release, make sure to set all of these to the latest
5# values.5# values.
6VERSIONS = {6VERSIONS = {
7 'bzr': '1.16',7 'bzr': '1.17',
8 'qbzr': '0.11.0',8 'qbzr': '0.12',
9 'bzrtools': '1.16.0',9 'bzrtools': '1.17.0',
10 'bzr-svn': '0.6.1',10 'bzr-svn': '0.6.3-win32-1',
11 'bzr-rebase': '0.5.0',11 'bzr-rewrite': '0.5.1',
12 'subvertpy': '0.6.7',12 'subvertpy': '0.6.8',
13}13}
1414
15# This will be passed to 'make' to ensure we build with the right python15# This will be passed to 'make' to ensure we build with the right python
@@ -125,7 +125,7 @@
125125
126126
127def _plugin_tag_name(plugin_name):127def _plugin_tag_name(plugin_name):
128 if plugin_name in ('bzr-svn', 'bzr-rebase', 'subvertpy'):128 if plugin_name in ('bzr-svn', 'bzr-rewrite', 'subvertpy'):
129 return '%s-%s' % (plugin_name, VERSIONS[plugin_name])129 return '%s-%s' % (plugin_name, VERSIONS[plugin_name])
130 # bzrtools and qbzr use 'release-X.Y.Z'130 # bzrtools and qbzr use 'release-X.Y.Z'
131 return 'release-' + VERSIONS[plugin_name]131 return 'release-' + VERSIONS[plugin_name]
@@ -134,7 +134,7 @@
134def update_plugin(plugin_name):134def update_plugin(plugin_name):
135 release_dir = get_plugin_release_dir(plugin_name)135 release_dir = get_plugin_release_dir(plugin_name)
136 if not os.path.isdir(plugin_name):136 if not os.path.isdir(plugin_name):
137 if plugin_name in ('bzr-svn', 'bzr-rebase'):137 if plugin_name in ('bzr-svn', 'bzr-rewrite'):
138 # bzr-svn uses a different repo format138 # bzr-svn uses a different repo format
139 call_or_fail([bzr(), 'init-repo', '--rich-root-pack', plugin_name])139 call_or_fail([bzr(), 'init-repo', '--rich-root-pack', plugin_name])
140 else:140 else:
@@ -195,7 +195,7 @@
195 install_plugin('bzrtools')195 install_plugin('bzrtools')
196 install_plugin('qbzr')196 install_plugin('qbzr')
197 install_plugin('bzr-svn')197 install_plugin('bzr-svn')
198 install_plugin('bzr-rebase')198 install_plugin('bzr-rewrite')
199199
200 build_installer()200 build_installer()
201201