Commit afb13ce6 authored by hvelarde's avatar hvelarde

Fixed https://bugs.launchpad.net/bugs/697913 : Buildout doesn't honor exit code from scripts.

git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@122980 62d5b8a3-27da-0310-9561-8e5933582275
parent f0d0ef63
...@@ -27,6 +27,9 @@ Bugs fixed: ...@@ -27,6 +27,9 @@ Bugs fixed:
- Removed any traces of the implementation of ``extended-by``. Raise a - Removed any traces of the implementation of ``extended-by``. Raise a
UserError if the option is encountered instead of ignoring it, though. 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) 1.5.2 (2010-10-11)
================== ==================
...@@ -38,7 +41,7 @@ Bugs fixed: ...@@ -38,7 +41,7 @@ Bugs fixed:
- Buildout defaults to including site packages. - 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 site-packages that it builds eggs, instead of never allowing access
to site-packages. to site-packages.
......
...@@ -73,7 +73,7 @@ customized site.py. ...@@ -73,7 +73,7 @@ customized site.py.
import zc.buildout.buildout import zc.buildout.buildout
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
zc.buildout.buildout.main() sys.exit(zc.buildout.buildout.main())
<BLANKLINE> <BLANKLINE>
The bootstrap process prefers final versions of zc.buildout, so it has The bootstrap process prefers final versions of zc.buildout, so it has
......
...@@ -2486,7 +2486,7 @@ If relative-paths is ``true``, the buildout script uses relative paths. ...@@ -2486,7 +2486,7 @@ If relative-paths is ``true``, the buildout script uses relative paths.
import zc.buildout.buildout import zc.buildout.buildout
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
zc.buildout.buildout.main() sys.exit(zc.buildout.buildout.main())
<BLANKLINE> <BLANKLINE>
......
...@@ -1517,7 +1517,7 @@ sys.path[0:0] = [ ...@@ -1517,7 +1517,7 @@ sys.path[0:0] = [
import %(module_name)s import %(module_name)s
if __name__ == '__main__': 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. # These are used only by the older ``scripts`` function.
......
...@@ -677,7 +677,7 @@ The demo script run the entry point defined in the demo egg: ...@@ -677,7 +677,7 @@ The demo script run the entry point defined in the demo egg:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main() sys.exit(eggrecipedemo.main())
Some things to note: Some things to note:
...@@ -714,7 +714,7 @@ rather than passing a requirement: ...@@ -714,7 +714,7 @@ rather than passing a requirement:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main() sys.exit(eggrecipedemo.main())
Passing entry-point information directly is handy when using eggs (or Passing entry-point information directly is handy when using eggs (or
distributions) that don't declare their entry points, such as distributions) that don't declare their entry points, such as
...@@ -845,7 +845,7 @@ to be included in the a generated script: ...@@ -845,7 +845,7 @@ to be included in the a generated script:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main() sys.exit(eggrecipedemo.main())
The ``scripts`` function: Providing script arguments The ``scripts`` function: Providing script arguments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -869,7 +869,7 @@ parentheses in the call: ...@@ -869,7 +869,7 @@ parentheses in the call:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main(1, 2) sys.exit(eggrecipedemo.main(1, 2))
The ``scripts`` function: Passing initialization code The ``scripts`` function: Passing initialization code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -895,7 +895,7 @@ You can also pass script initialization code: ...@@ -895,7 +895,7 @@ You can also pass script initialization code:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main(1, 2) sys.exit(eggrecipedemo.main(1, 2))
The ``scripts`` function: Relative paths The ``scripts`` function: Relative paths
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -941,7 +941,7 @@ to pass a common base directory of the scripts and eggs: ...@@ -941,7 +941,7 @@ to pass a common base directory of the scripts and eggs:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main() sys.exit(eggrecipedemo.main())
Note that the extra path we specified that was outside the directory Note that the extra path we specified that was outside the directory
passed as relative_paths wasn't converted to a relative path. passed as relative_paths wasn't converted to a relative path.
...@@ -1518,7 +1518,7 @@ The demo script runs the entry point defined in the demo egg: ...@@ -1518,7 +1518,7 @@ The demo script runs the entry point defined in the demo egg:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main() sys.exit(eggrecipedemo.main())
>>> demo_call = join(interpreter_bin_dir, 'demo') >>> demo_call = join(interpreter_bin_dir, 'demo')
>>> if sys.platform == 'win32': >>> if sys.platform == 'win32':
...@@ -1565,7 +1565,7 @@ Let's see ``script_arguments`` and ``script_initialization`` in action. ...@@ -1565,7 +1565,7 @@ Let's see ``script_arguments`` and ``script_initialization`` in action.
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main(1, 2) sys.exit(eggrecipedemo.main(1, 2))
Handling custom build options for extensions provided in source distributions Handling custom build options for extensions provided in source distributions
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
......
...@@ -388,7 +388,7 @@ Let's look at the script that was generated: ...@@ -388,7 +388,7 @@ Let's look at the script that was generated:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main() sys.exit(eggrecipedemo.main())
Relative egg paths Relative egg paths
------------------ ------------------
...@@ -441,7 +441,7 @@ Let's look at the script that was generated: ...@@ -441,7 +441,7 @@ Let's look at the script that was generated:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main() sys.exit(eggrecipedemo.main())
You can specify relative paths in the buildout section, rather than in You can specify relative paths in the buildout section, rather than in
each individual script section: each individual script section:
...@@ -488,7 +488,7 @@ each individual script section: ...@@ -488,7 +488,7 @@ each individual script section:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
eggrecipedemo.main() sys.exit(eggrecipedemo.main())
Specifying initialialization code and arguments Specifying initialialization code and arguments
----------------------------------------------- -----------------------------------------------
...@@ -538,7 +538,7 @@ to be included in generated scripts: ...@@ -538,7 +538,7 @@ to be included in generated scripts:
import eggrecipedemo import eggrecipedemo
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': 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 Here we see that the initialization code we specified was added after
setting the path. Note, as mentioned above, that leading whitespace setting the path. Note, as mentioned above, that leading whitespace
...@@ -593,7 +593,7 @@ declare entry points using the entry-points option: ...@@ -593,7 +593,7 @@ declare entry points using the entry-points option:
import foo.bar import foo.bar
<BLANKLINE> <BLANKLINE>
if __name__ == '__main__': if __name__ == '__main__':
foo.bar.a.b.c() sys.exit(foo.bar.a.b.c())
Generating all scripts Generating all scripts
---------------------- ----------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment