This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients eric.araujo, kern, loewis, radious, tarek, ygingras
Date 2011-04-18.17:42:23
SpamBayes Score 1.6653345e-16
Marked as misclassified No
Message-id <1303148544.59.0.251843023564.issue10946@psf.upfronthosting.co.za>
In-reply-to
Content
> Could you please at least describe the test that you mentioned (link
> doesn't work).
I still have a local copy \o/.  Yannick’s patch looks like this:

    def test_skip_build(self):
        pkg_pth, dist = self.create_dist()

        # With the skip_build option, command.build is not called.
        cmd = bdist(dist)
        cmd.skip_build = True
        cmd.ensure_finalized()
        cmd.run()
        self.assertFalse(dist.have_run['build'])

        # Without skip_build option, command.build is called.
        cmd = bdist(dist)
        cmd.skip_build = False
        cmd.ensure_finalized()
        cmd.run()
        self.assertTrue(dist.have_run['build'])

> I added line that passes skip_build from bdist.py to its subcommands
> and it worked for me (at least for simple cases)
What about non-simple cases?  They need to work too.

>- base.py is not called.
(Assuming you meant “build is not called”)

> Using set_undefined_options in install_* is definitely not safe,
> because it fails if parent process has not set skip_build.
Really?  Also, what is “parent process”?  Do you mean that it fails if the command used as source in set_undefined_options does not define the skip_build option in its user_options?

I’m not sure it’d be good to make the install_* skip_build option depend on (== set_undefined_options from) bdist’s skip_build.  I’ve written a bit of code to make testing interaction between commands easier (for example, to test that “setup.py build bdist --skip-build install” runs the second install command without skip_build set to True), I should put it in the main repo so that it can be used for this bug.  Getting good test coverage before we change code is absolute requisite for those dark areas.  Removing the easy keyword :)

> Anyway test_skip_build() is still broken and needs a fix.
Okay, so maybe fix that first.
History
Date User Action Args
2011-04-18 17:42:24eric.araujosetrecipients: + eric.araujo, loewis, kern, tarek, ygingras, radious
2011-04-18 17:42:24eric.araujosetmessageid: <1303148544.59.0.251843023564.issue10946@psf.upfronthosting.co.za>
2011-04-18 17:42:24eric.araujolinkissue10946 messages
2011-04-18 17:42:23eric.araujocreate