El dv 08 de 10 de 2010 a les 09:13 +0000, en/na Jelmer Vernooij va escriure: > Hi David, > Hey Jelmer, Thanks for the quick reply. > On Fri, 2010-10-08 at 08:19 +0000, David Planella wrote: > > El dt 05 de 10 de 2010 a les 12:39 +0000, en/na Jelmer Vernooij va > > escriure: > > > Is there any chance you could make the dependency on python-distutils-extra optional? > > I'll do whatever it takes to make the application usable by anyone in > > their own language. > > > > However, I do not understand the rationale for not wanting to have > > python-distutils-extra as a build dependency. If bzr-gtk were to ever > > enter main, it would also help building the pot template seamlessly and > > make it translatable in Launchpad without the need of any manual > > debian/rules hacking. So that's another plus point. > > > My main concern is that removing it also means that you'll have to write > > a command to build translations as a substitute for build_i18n. That > > will mean either reinventing the wheel or ignoring translations (in case > > no one writes that new command for python-distutils). > > I think it's a good idea to automatically make bzr-gtk build i18n > support when python-distutils-extra is available. If it isn't then I > don't want to require users to install it - they might not care about > i18n and should not have to install DistUtilsExtra unless they want i18n > support. > I'm not sure I can follow, since if I understand it correctly, that would be a build dependency, that only developers should care about, not users. Note that I'm not trying to be picky, it might well be me missing something, I'm just asking to understand. In any case, I'm just as happy with making it optional. > Installing extra dependencies is significantly harder on some platforms > than on Ubuntu, and for that reason I'm trying to keep as much of our > dependencies optional. > > Just adding python-distutils-extra to the list of dependencies in > debian/control should still be sufficient to get i18n support on > Debian/Ubuntu. > > > > Preferably by just providing a dummy command that tells the user to > > install it when they run 'build_i18n'. Otherwise I'm happy to merge > > this. > > > I'm not familiar with Python packaging and distribution outside of > > a .deb package, but is there not a more elegant way to check for > > dependencies in python-distutils if someone is building from source? > I'm thinking of something along these lines to cope with DistUtilsExtra > being missing (not actually tested, my memory of the distutils API is > rusty): > > try: > from DistUtilsExtra.command import * > except ImportError: > # DistUtilsExtra not available. > > class cmd_build_i18n(Command): > > def run(self): > print "Please install distutilsextra for i18n support." > else: > # Use build_i18n from DistUtilsExtra > cmd_build_i18n = build_i18n.build_i18n > > > ... > cmdclass={ > 'build_i18n': cmd_build_i18n, > ... > Ok, I'll go for that, then. I'll be busy or away until Wednesday, but I'll try to get to it by the end of next week. Looking forward to see bzr-gtk in many languages! Regards, David.