1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #127 new

prefer v1.4.1 in binary egg format over v1.4.5 in sdist format when I'm requiring >= v1.1.0

Zooko O'Whielacronx
created an issue

As described on the setuptools issue tracker:

http://bugs.python.org/setuptools/issue83

Comments (7)

  1. Lennart Regebro
    • edited description
    • marked as proposal
    • removed milestone

    I disagree that it should prefer binary over sources in general. Possibly some sort of parameter indicating that it should could be an option, and this could then be used on systems that does not have compilers.

  2. Zooko O'Whielacronx reporter

    Is there any point in talking about this -- i.e. any chance that patches will be applied to distribute and a new version of distribute released?

    Can you give an example of when a user would prefer the source distribution over the binary distribution?

  3. Jason R. Coombs

    I tend to agree with Lennart, though I have encountered some cases where this issue would bite Windows users - if a binary build is available and the user doesn't have a suitable compiler environment set up, setuptools/distribute would find the later, source-only version, attempt to compile it, and fail, even though it could have succeeded with the binary build that also satisfied the requirements.

    I see Zooko's point - distribute does prefer binary builds when they're available as the latest version. It seems reasonable that it could also prefer binary builds when they're not the latest.

    I don't think we want to change the status quo at this time, however. Instead, Lennart's suggestion of an option sounds good. Perhaps it could be enabled by either a command-line switch or an environment variable.

    Zooko, I believe if the feature were made available as an option, I would have little concern pulling in the change. Furthermore, if we were to find that a majority of users were to be using the option, we would consider making it the default in the future.

  4. Zooko O'Whielacronx reporter

    Well, we have a specific use case where this behavior is necessary, and I have not yet understood if there are any specific use cases where the opposite behavior is necessary. It isn't only Windows users who don't have a development environment installed -- it is quite common on Linux and Mac as well.

    In the Tahoe-LAFS project, we have long ago started using a fork of setuptools/distribute which changes this behavior to the way our users needed. This greatly reduced the frequency of this sort of bug report. (It didn't entirely eliminate this sort of bug report only because there are still some cases where no binary package exists of a sufficient version for the user's platform, which is of course a different problem but with similar symptoms from the user's perspective.) Therefore, we were able to close this ticket:

    https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1233

    We also wrote unit tests which simulated the situation (a binary egg of a sufficient version number, for the current platform, plus a source egg of a sufficient and newer version number) and installed those unit tests on our buildbot to confirm that our patch worked on all of our supported platforms. You can find the relevant patches in our trac:

    https://tahoe-lafs.org/trac/tahoe-lafs/changeset/a1cef915fd689308a7d4135310679115f860201d/git

    https://tahoe-lafs.org/trac/tahoe-lafs/changeset/a44330dfeef23757f4068936c6c1614862ab7a0b/git

    https://tahoe-lafs.org/trac/tahoe-lafs/changeset/b4c14421f7c2f25aa1839e15d75aa004cf420e67/git

    In all honesty, my enthusiasm for contributing patches to Python packaging tools is currently on the wane. Or maybe simply my load of competing work is greater than ever? In any case, while I will certainly help by providing debugging services, patches, answers to questions, or anything else you need if you were to take the initiative of adopting this feature, I'm not likely to keep pushing this feature on my own if your interest is minimal.

  5. Log in to comment