Buildout doesn't work with version 4.0 any more

Issue #409 invalid
Manuel Günther created an issue

Hi folks,

we are using coverage in combination with buildout to check the coverage of our packages on Travis CI. Everything was working nicely until you have released version 4.0 of your package. The problem is that buildout does not seem to like the main.py, it simply doesn't find it:

https://travis-ci.org/bioidiap/bob.ip.base/jobs/81698979

The way buildout works is that it creates a script in the ./bin directory, where it sets the paths according to the installed packages, and runs

sys.exit(coverage.main())

Unfortunately, this doesn't work, as the main() function is not included into the init.py. A simple solution would be to add a line in the init.py, which says:

from .__main__ import main

(I haven't checked that this is working, though).

Could you please add this line, so that our builds on Travis will work again? Thanks a lot Manuel

Comments (7)

  1. Ned Batchelder repo owner

    I don't understand why buildout is looking for coverage.main(). The entrypoints declared in the setup.py correctly points to coverage.cmdline.main()

    Can you provide me with a reproducible scenario to show the failure?

  2. Manuel Günther reporter

    Indeed, that is weird. In fact, when I run buildout, I see the line:

    Generated script '<...>/bin/coverage'.
    Generated script '<...>/bin/coverage'.
    

    twice. Maybe the reason is that we combine coverage with coveralls and cpp-coveralls, one of which might overwrite this.

    I will yet have to figure out, what package is triggering our issue. Do you maybe have any idea, which other package might generate the second bin/coverage script?

  3. Manuel Günther reporter

    Thank you so much for getting this fixed, although it wasn't even your code that was erroneous.

  4. Log in to comment