On Sat, 2020-06-27 at 12:54 +0200, Gianfranco Costamagna wrote: > Hello Ian, > > > It seems like pybuild has some heuristics for picking the build > plugin > > to use, for me (and buildd) it selects plugin_distutils.py but for > you > > it is selecting plugin_cmake.py. I can't see why. If you somehow > had a > > `CMakeCache.txt` in the package directory that might explain it, > but > > there's no reason for one of those to be there (I assume you'd have > > said if this was e.g. a repeated build without cleaning the package > dir > > in the middle, but even if it was I don't think I'd ). > > > > In the absence of a local repro I'm going to throw in a > > 'PYBUILD_SYSTEM=distutils' which ought to force things to go the > > desired way no matter what. Fingers crossed! > > > > > I agree on your analysis. > In Ubuntu the build has been failing since the begin, and for some > reasons it started being successful yesterday, before your upload. > > I can say that I tried to use a patched pybuild > - log.debug('detected build system: %s (certainty: %s%%)', > plugin.NAME, certainty) > + log.info('detected build system: %s (certainty: %s%%)', > plugin.NAME, certainty) > > and the certainty was 50% fixed > I: pybuild pybuild:131: detected build system: distutils (certainty: 50%) > > versus > I: pybuild pybuild:131: detected build system: cmake (certainty: 50%)
Thanks, I wonder if when both are the same there is some randomness in the choice, maybe based on e.g. order of the files in the unsorted directory (which might be fixed for a given base image, so it might not be random for a given setup but only between setups?). > I can say, on Ubuntu builders, cmake was always pick up (not since > yesterday), while on local pbuilder and Debian, distutils was pick up > > if you rebuild locally after the first build, the counter increases > to 60%. Which choice becomes 60%? cmake plugin has (the number is the extra score): OPTIONAL_FILES = {'cmake_uninstall.cmake': 10, 'CMakeCache.txt': 10} while distutils has: OPTIONAL_FILES = {'setup.cfg': 1, 'requirements.txt': 1, 'PKG-INFO': 10, '*.egg-info': 10} So I guess one of those 10-point files is left after the first build. > This is my wild guess, but teaching pybuild to don't care about it > looks a sane option. Thanks, I uploaded -3 this morning which forces distutils. > > Just my .02$ > > Gianfranco >