zc.buildout doesn't create scripts from the 'scripts' setup.py option (like used by pyflakes and docutils)

Bug #422724 reported by Reinout van Rees
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Buildout
In Progress
Undecided
Reinout van Rees

Bug Description

Scripts is used by for instance pyflakes and docutils. Here's pyflakes' setup.py:

setup(
    name="pyflakes",
    license="MIT",
    version="0.3.0",
    description="passive checker of Python programs",
    author="Phil Frost",
    maintainer="Moe Aboulkheir",
    <email address hidden>",
    url="http://www.divmod.org/trac/wiki/DivmodPyflakes",
    packages=["pyflakes", "pyflakes.scripts", "pyflakes.test"],
    scripts=["bin/pyflakes"],
    long_description="""Pyflakes is program to analyze Python programs and detect various errors. It
works by parsing the source file, not importing it, so it is safe to use on
modules with side effects. It's also much faster.""")

It is a different way than console_scripts, but with a similar goal. If you add pyflakes or docutils to a zc.recipe.buildout part's eggs list, nothing happens (which is a pain).

So 'scripts' needs to be supported in addition to the console_scripts entry point.

Revision history for this message
Reinout van Rees (reinout) wrote :

I've got a working solution in zc.buildout/branches/reinout-scripts which needs testing on windows. The buildout of the branch itself proves that it works by installing bin/pyflakes and bin/rst2* from docutils.

Changed in zc.buildout:
assignee: nobody → Reinout van Rees (reinout)
status: New → In Progress
Revision history for this message
Jim Fulton (jim-zope) wrote : Re: [Bug 422724] Re: zc.buildout doesn't create scripts from the 'scripts' setup.py option (like used by pyflakes and docutils)

The right way to prove that it works is with tests.

Jim

On Fri, Sep 4, 2009 at 8:07 AM, Reinout van Rees<email address hidden> wrote:
> I've got a working solution in zc.buildout/branches/reinout-scripts
> which needs testing on windows.  The buildout of the branch itself
> proves that it works by installing bin/pyflakes and bin/rst2* from
> docutils.
>
> ** Changed in: zc.buildout
>       Status: New => In Progress
>
> ** Changed in: zc.buildout
>     Assignee: (unassigned) => Reinout van Rees (reinout)
>
> --
> zc.buildout doesn't create scripts from the 'scripts' setup.py option (like used by pyflakes and docutils)
> https://bugs.launchpad.net/bugs/422724
> You received this bug notification because you are subscribed to
> Buildout.
>

--
Jim Fulton

Revision history for this message
Reinout van Rees (reinout) wrote :

Well, the tests prove it too, of course. I've added a distutils-style script to the 'other' egg that's generated in the test setup and that gets picked up and installed correctly.

The pyflakes/docutils inclusion in the buildout was just to make it more visible. And a real-live test in addition to a test-test can't hurt.

(Of course it must be removed from the buildout.cfg before merging!)

Revision history for this message
Reinout van Rees (reinout) wrote :

One additional comment on the branch: the scripts aren't detected (as I use os.listdir) if the eggs are zipped. Unzipping eggs just for detecting old-style scripts seems wasteful to me. (I've always got unzip=True set anyway...)

(awaiting answer on the mailinglist for possible hints to work around it).

I have updated the documentation and cleaned up some left-over comments, so the branch is ready for review. What's the best way to proceed with that?

Revision history for this message
Marius Gedminas (mgedmin) wrote :

After the extensive zc.buildout 1.5.0 this bug now probably also exists in z3c.recipe.scripts?

Revision history for this message
Reinout van Rees (reinout) wrote :

Well, it was never properly a bug: it just wasn't ever implemented. Buildout only looks at console_script entry points.

So I don't know about z3c.recipe.scripts, but at least buildout 1.5.0 could not have broken a feature that wasn't there in the first place :-)

Revision history for this message
Mark van Lent (markvl) wrote :

Does anyone know if Reinouts work will ever get merged? Has it perhaps been merged already? (I'm guessing not given the behaviour I'm seeing when installing virtualenvwrapper.)

Revision history for this message
Jim Fulton (jim-zope) wrote :

It was merged in the new repo:

https://github.com/buildout/buildout

This will be released in the next buildout2 alpha release, which is nearly ready to be released.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.