At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 4530
revision-id: [email protected]
parent: [email protected]
committer: John Arbash Meinel <[email protected]>
branch nick: jam-integration
timestamp: Tue 2009-07-14 10:01:19 -0500
message:
  instead of updating PYTHONPATH in Makefile, update generate_docs to find 
bzrlib.
  PYTHONPATH cannot be set portably between OSes (win32 requires ';' 
separation, versus ':'
  on other platforms.)
  Rather than work out how to get platform independent Makefile, just do it in 
python.
=== modified file 'Makefile'
--- a/Makefile  2009-06-29 11:02:31 +0000
+++ b/Makefile  2009-07-14 15:01:19 +0000
@@ -169,14 +169,14 @@
        $(wildcard $(addsuffix /*.txt, bzrlib/help_topics/en)) 
 
 doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
-       PYTHONPATH=.:$$PYTHONPATH $(PYTHON) tools/generate_docs.py -o $@ rstx
+       $(PYTHON) tools/generate_docs.py -o $@ rstx
 
 doc/en/release-notes/NEWS.txt: NEWS
        $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
 
 MAN_PAGES = man1/bzr.1
 man1/bzr.1: $(MAN_DEPENDENCIES)
-       PYTHONPATH=.:$$PYTHONPATH $(PYTHON) tools/generate_docs.py -o $@ man
+       $(PYTHON) tools/generate_docs.py -o $@ man
 
 # build a png of our performance task list
 # 

=== modified file 'tools/generate_docs.py'
--- a/tools/generate_docs.py    2009-06-19 09:27:13 +0000
+++ b/tools/generate_docs.py    2009-07-14 15:01:19 +0000
@@ -32,12 +32,13 @@
 
 Run "%(prog)s --help" for the option reference.
 """
-
-import bzrlib.commands
+import os
 import sys
 from optparse import OptionParser
 
-from bzrlib import doc_generate
+sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
+
+from bzrlib import commands, doc_generate
 
 def main(argv):
     parser = OptionParser(usage="""%prog [options] OUTPUT_FORMAT
@@ -69,8 +70,8 @@
     if len(args) != 2:
         parser.print_help()
         sys.exit(1)
-    
-    bzrlib.commands.install_bzr_command_hooks()
+
+    commands.install_bzr_command_hooks()
 
     infogen_type = args[1]
     infogen_mod = doc_generate.get_module(infogen_type)

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to