Ticket #2630 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

installation of Nevow doesn't have automated tests

Reported by: zooko Assigned to: washort
Priority: normal Milestone:
Component: Operations Severity: normal
Keywords: packaging easy_install setuptools Cc:
Estimated Completion (YYYY/MM/DD): Branch:
Author:

Description

There are now two tickets which are important to me as a Nevow user (in the http://allmydata.org Tahoe project) and which have simple patches to solve them, but which patches are not applied because installation of Nevow does not get automatically tested, and exarkun doesn't want to apply patches to code that isn't getting automatically tested.

Those tickets are #2629 (Nevow doesn't declare its dependency on Twisted in a machine-parseable way) and #2527 (Nevow can't find its own package resources at run-time on certain platforms, or if installed in a zip file such as for py2exe). See also #857 (Source release process does not include important files).

Here is an excerpt from the Twisted master.cfg, thanks to Radix, which tests installation of Twisted. If we apply this code to the Nevow master.cfg then installation of Nevow using easy_install will be automatically tested, exarkun will accept my patches that fix these issues, and I will be very relieved that I can go ahead and release the imminent v1.1.0 of allmydata.org Tahoe without exposing my users to these issues.

Thanks.

class TwistedEasyInstallFactory(TwistedBaseFactory):
    treeStableTimer = 5*60

    def __init__(self, source, uncleanWarnings, python="python",
                 reactor="epoll", easy_install="easy_install"):
        TwistedBaseFactory.__init__(self, source, uncleanWarnings)
        if type(python) == str:
            python = [python]


        setupCommands = [
            ["rm", "-rf", "install"],
            ["mkdir", "-p", "install/bin", "install/lib"],
            [easy_install, "--install-dir", "install/lib",
                           "--script-dir", "install/bin",
                           "."],
            ]
        for command in setupCommands:
            self.addStep(shell.ShellCommand, command=command,
                         env={"PYTHONPATH": "install/lib"},
                         haltOnFailure=True)
        self.addTrialStep(
            name=reactor, python=python,
            reactor=reactor, flunkOnFailure=True,
            warnOnFailure=False, workdir="Twisted/install",
            env={"PYTHONPATH": "lib"})

Change History

06/02/08 20:12:27 changed by zooko

Here is the ticket on the allmydata.org trac to track this issue as it impacts allmydata.org Tahoe:

http://allmydata.org/trac/tahoe/ticket/440

06/08/08 19:01:44 changed by zooko

Okay, now there are automated tests of installation, but the tests have some problems:

http://divmod.org/users/buildbot.twistd/q-nevow/builds/245/step-shell_3/0

We need to use something like python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]' instead of a literal python2.4 so that this will also work with Python 2.5.

06/08/08 19:02:45 changed by zooko

We should change the "nevow-windows" builder to try installing into an installdir and running the tests from that version, so that we will know if some patch breaks install on Windows.

06/09/08 15:53:10 changed by exarkun

  • owner changed from exarkun to washort.
  • component changed from Nevow to Operations.

07/01/08 12:14:38 changed by washort

  • status changed from new to closed.
  • resolution set to fixed.

q-nevowinstall now tests Nevow installation.

09/01/08 13:34:10 changed by zooko

It should probably do "easy_install ." instead of "easy_install Nevow" since the latter might end up fetching a Nevow package from pypi.python.org instead of installing the version that was just built from source in the current build dir. (In practice it does choose to use the one from that current build dir, but it would be surer and clearer to use '.' to show that.)

Also the step to mkdir install/lib and install/bin is useless and probably vestigial -- the lib and bin dirs are created under "installdir" automatically by the easy_install step.

09/01/08 16:31:05 changed by zooko

Hm.. It looks like one step is doing rm -rf ./install but then a later step is doing easy_install --prefix=${PWD}/installdir. Is it that the former is supposed to be blowing away the "installdir"? Or is the former step just vestigial?

10/21/08 21:41:00 changed by zooko

  • status changed from closed to reopened.
  • resolution deleted.

dash.... please look at my two previous comments on this ticket ....

10/21/08 21:50:39 changed by zooko

Oh, it seems things have changed since I wrote those comments, now, in the "linux32-py2.5-nevowinstall" -- http://buildbot.divmod.org/builders/linux32-py2.5-nevowinstall -- it does

sh -c mkdir -p installdir/lib/python2.5/site-packages && PYTHONPATH=${PWD}/installdir/lib/python2.5/site-packages python2.5 `which easy_install` -v -v -v --prefix=${PWD}/installdir Divmod/Nevow

That looks right. Also it is rm -rf'ing "installdir" instead of "install" now. So both of my complaints have already been fixed, but this ticket wasn't updated (perhaps since this ticket was already closed at the time because I neglected to re-open it when I posted my complaints).

Sorry for the noise.

10/21/08 21:51:00 changed by zooko

P.S. Hey, there is no button to close this ticket, so someone else will have to do that.

10/22/08 08:03:04 changed by mithrandi

  • status changed from reopened to closed.
  • resolution set to fixed.
jethro@divmod.org