[Checkins] SVN: zc.buildout/trunk/ Fixed https://bugs.launchpad.net/bugs/697913 : Buildout doesn't honor exit code from scripts.

Hector Edwardo Velade Diaz hvelarde at yahoo.com
Tue Sep 27 16:20:50 EST 2011


Log message for revision 122980:
  Fixed https://bugs.launchpad.net/bugs/697913 : Buildout doesn't honor exit code from scripts.

Changed:
  U   zc.buildout/trunk/CHANGES.txt
  U   zc.buildout/trunk/src/zc/buildout/bootstrap.txt
  U   zc.buildout/trunk/src/zc/buildout/buildout.txt
  U   zc.buildout/trunk/src/zc/buildout/easy_install.py
  U   zc.buildout/trunk/src/zc/buildout/easy_install.txt
  U   zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/README.txt

-=-
Modified: zc.buildout/trunk/CHANGES.txt
===================================================================
--- zc.buildout/trunk/CHANGES.txt	2011-09-27 17:51:45 UTC (rev 122979)
+++ zc.buildout/trunk/CHANGES.txt	2011-09-27 21:20:50 UTC (rev 122980)
@@ -27,6 +27,9 @@
 - Removed any traces of the implementation of ``extended-by``. Raise a
   UserError if the option is encountered instead of ignoring it, though.
 
+- https://bugs.launchpad.net/bugs/697913 : Buildout doesn't honor exit code
+  from scripts. Fixed.
+
 1.5.2 (2010-10-11)
 ==================
 
@@ -38,7 +41,7 @@
 
   - Buildout defaults to including site packages.
 
-  - Buildout loads recipes and extensions with the same constraints to
+  - Buildout loads recipes andhttps://bugs.launchpad.net/bugs/697913 extensions with the same constraints to
     site-packages that it builds eggs, instead of never allowing access
     to site-packages.
 

Modified: zc.buildout/trunk/src/zc/buildout/bootstrap.txt
===================================================================
--- zc.buildout/trunk/src/zc/buildout/bootstrap.txt	2011-09-27 17:51:45 UTC (rev 122979)
+++ zc.buildout/trunk/src/zc/buildout/bootstrap.txt	2011-09-27 21:20:50 UTC (rev 122980)
@@ -73,7 +73,7 @@
     import zc.buildout.buildout
     <BLANKLINE>
     if __name__ == '__main__':
-        zc.buildout.buildout.main()
+        sys.exit(zc.buildout.buildout.main())
     <BLANKLINE>
 
 The bootstrap process prefers final versions of zc.buildout, so it has

Modified: zc.buildout/trunk/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/trunk/src/zc/buildout/buildout.txt	2011-09-27 17:51:45 UTC (rev 122979)
+++ zc.buildout/trunk/src/zc/buildout/buildout.txt	2011-09-27 21:20:50 UTC (rev 122980)
@@ -2486,7 +2486,7 @@
     import zc.buildout.buildout
     <BLANKLINE>
     if __name__ == '__main__':
-        zc.buildout.buildout.main()
+        sys.exit(zc.buildout.buildout.main())
     <BLANKLINE>
 
 

Modified: zc.buildout/trunk/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/easy_install.py	2011-09-27 17:51:45 UTC (rev 122979)
+++ zc.buildout/trunk/src/zc/buildout/easy_install.py	2011-09-27 21:20:50 UTC (rev 122980)
@@ -1517,7 +1517,7 @@
 import %(module_name)s
 
 if __name__ == '__main__':
-    %(module_name)s.%(attrs)s(%(arguments)s)
+    sys.exit(%(module_name)s.%(attrs)s(%(arguments)s))
 '''
 
 # These are used only by the older ``scripts`` function.

Modified: zc.buildout/trunk/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/trunk/src/zc/buildout/easy_install.txt	2011-09-27 17:51:45 UTC (rev 122979)
+++ zc.buildout/trunk/src/zc/buildout/easy_install.txt	2011-09-27 21:20:50 UTC (rev 122980)
@@ -677,7 +677,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Some things to note:
 
@@ -714,7 +714,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Passing entry-point information directly is handy when using eggs (or
 distributions) that don't declare their entry points, such as
@@ -845,7 +845,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 The ``scripts`` function: Providing script arguments
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -869,7 +869,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main(1, 2)
+        sys.exit(eggrecipedemo.main(1, 2))
 
 The ``scripts`` function: Passing initialization code
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -895,7 +895,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main(1, 2)
+        sys.exit(eggrecipedemo.main(1, 2))
 
 The ``scripts`` function: Relative paths
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -941,7 +941,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Note that the extra path we specified that was outside the directory
 passed as relative_paths wasn't converted to a relative path.
@@ -1518,7 +1518,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
     >>> demo_call = join(interpreter_bin_dir, 'demo')
     >>> if sys.platform == 'win32':
@@ -1565,7 +1565,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main(1, 2)
+        sys.exit(eggrecipedemo.main(1, 2))
 
 Handling custom build options for extensions provided in source distributions
 -----------------------------------------------------------------------------

Modified: zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/README.txt
===================================================================
--- zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2011-09-27 17:51:45 UTC (rev 122979)
+++ zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2011-09-27 21:20:50 UTC (rev 122980)
@@ -388,7 +388,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Relative egg paths
 ------------------
@@ -441,7 +441,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 You can specify relative paths in the buildout section, rather than in
 each individual script section:
@@ -488,7 +488,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Specifying initialialization code and arguments
 -----------------------------------------------
@@ -538,7 +538,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main(a, 2)
+        sys.exit(eggrecipedemo.main(a, 2))
 
 Here we see that the initialization code we specified was added after
 setting the path.  Note, as mentioned above, that leading whitespace
@@ -593,7 +593,7 @@
     import foo.bar
     <BLANKLINE>
     if __name__ == '__main__':
-        foo.bar.a.b.c()
+        sys.exit(foo.bar.a.b.c())
 
 Generating all scripts
 ----------------------



More information about the checkins mailing list