Buildout -- Software for automating application assembly

Console scripts do not call sys.exit

Reported by Ashley Walsh on 2007-11-23
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Buildout
Undecided
Unassigned

Bug Description

When a 'console_script' is installed by easy_install it uses::

    sys.exit(
        load_entry_point(...)()
        )

A script installed by buildout does not call sys.exit(), so it does not match the
behaviour of easy_install.

kumar303 (kumar-mcmillan) wrote :

Hi. This is a problem for sphinx-build because running the doctest builder does not exit non-zero in a Makefile. This probably affects lots of other scripts since easy_install proper will create a script that exits non-zero.

Here is a patch that is working for me to fix the problem. I have not tried to run the zc.buildout test suite after this change though.

Olaf Conradi (olaf-conradi) wrote :

I ran into the same problem.
Any chance the attached patch can be merged?

Thanks

I ran into this problem when installing py.test with zc.recipe.egg (and z3c.recipe.scripts). A *hack* to achieve the wanted behavior is:

[py.test]
recipe = z3c.recipe.scripts
eggs = py.test
            ...
script-initialization =
  import pytest
  if __name__ == '__main__': sys.exit(pytest.main())

This bug was reported over 3 years ago and patched well over a year ago -- any decision on merging it in?

On Mon, Mar 14, 2011 at 3:06 PM, Andrew Clegg <email address hidden> wrote:
> This bug was reported over 3 years ago and patched well over a year ago
> -- any decision on merging it in?

I think it will happen at the sprints this week.

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton

Takeshi KOMIYA (i-tkomiya) wrote :

Hi, I met this problem too.
Is there any problem to apply the fix?

I'm replacing generated scripts with sed command now...

Jim Fulton (jim-zope) wrote :

This will be fixed in buildout 1.6.0, which should be released in a few days.

Changed in zc.buildout:
status: New → Fix Committed
Alin Voinea (avoinea) wrote :

Where is version 1.6.0?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers