|
From: <ic...@ov...> - 2019-02-06 18:20:52
|
On Wed, 6 Feb 2019, Steven R. Loomis wrote: > Andi, > ICU creates the .pc pkgconfig files for each platform that is built with > Makefiles, including Mac. So, pkg-config could be installed independently > of any other packager. What matters, in the PyICU use case, is whether pkg-config is installed by default, not whether it could be installed. I cannot ask the user to install pkg-config. For those who don't know how to install anything (beyond running pip, a sizable proportion of users), installing PyICU is hard enough. The PyICU users who complain about having to edit setup.py or set the env variables that tell the compiler where ICU headers are installed and the linker where its libraries are, don't usually know about pkg-config at all - all they want is to be able to install PyICU via pip (and not have to deal with compilation at all - but I can't / don't want to distribute binaries). Thus, I'm stuck with default-configured systems. The icu-config program was convenient in the sense that it was always there by default (unless some packagers removed it). The pkg-config program is there by default on Linux but nowhere else, apparently. If icu-config disappeared on Mac before pkg-config was installed on MacOS by default, users of PyICU on Mac would have to revert to setting env vars manually or edit setup.py. > In any event, as to your proposed direction? would you be able to *prefer* > pkg-config, and then fall back to icu-config if pkg-config wasn't found? Last night, I implemented a fix that tries both icu-config and pkg-config, picking the first that responds, on Linux, with icu-config being tried first. It would be trivial to try pkg-config first, of course. This fix is available in PyICU's HEAD: https://github.com/ovalhub/pyicu/blob/master/setup.py But, currently, trying pkg-config is only enabled on Linux: https://github.com/ovalhub/pyicu/blob/master/setup.py#L84 Andi.. > > Thanks, > Steven > > > On Tue, Feb 5, 2019 at 9:31 PM Vincent Torri <vin...@gm...> > wrote: > >> On Wed, Feb 6, 2019 at 3:23 AM <ic...@ov...> wrote: >>> >>> >>> Hi Steven, >>> >>> On Tue, 5 Feb 2019, Steven R. Loomis wrote: >>> >>>> pkg-config is portable and is the preferred way of getting config >> flags. >>>> icu-config is more fragile and requires that we manage our dependencies >>>> manually. Does pkg-config add an unreasonable burden? >>> >>> About portability: >>> I see that the various linuxes I run have a pkg-config program in >> /usr/bin. >>> My Mac, apparently, doesn't (no, macports, homebrew, etc... don't count). >>> And what about Windows ? (I have no access to Windows at all). >> >> pkg-config exists on most platforms : UNIX (linux, BSD* and >> Openindiana), Mac OS X (compiled from source or from macports or >> homebrew) and Windows (with MSYS2 or cygwin). We use it in our project >> on these platforms. I've compiled ICU with MSYS2 on Windows. >> >> regards >> >> Vincent Torri >> >>> About burden: >>> I think, generally speaking, the build config automation issue is a real >>> burden because of its unknown many failure modes. It's quite simple to >> edit >>> the setup.py file, in my opinion. But many people seem to disagree. >>> >>> I agree that pkg-config seems to be the way to go, if only it were >> supported >>> everywhere icu-config currently is (or was). >>> >>> I think that a reasonable way forward is to extend the icu-config >> support in >>> PyICU's setup.py to fallback to pkg-config since their command-line >>> interfaces are very similar. >>> >>> Andi.. >>> >>>> It was debian in fact which pushed for this change. icu-config exposes >>>> architecture dependent paths. You can read more at >>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776821 >>>> >>>> "The long term solution is to move to pkg-config and remove icu-config >>>> entirely." >>>> >>>> Steven >>>> >>>> On Tue, Feb 5, 2019 at 3:49 PM <ic...@ov...> wrote: >>>> >>>>> >>>>> Dear icu-support, >>>>> >>>>> I'm being told by PyICU users (on Debian at least) that the icu-config >>>>> program is deprecated upstream and that it was thus removed from the >>>>> libicu-dev package. >>>>> >>>>> PyICU is "easier" to install when icu-config is present as setup.py >> invokes >>>>> it and configures the few settings it needs to build against the ICU >>>>> installation thus found. >>>>> >>>>> What is the story here ? >>>>> >>>>> PyICU can install without icu-config - this was the situation for a >> decade >>>>> until a user proposed a patch that uses icu-config and falls back to >> the >>>>> previous "edit setup.py or set env vars" approach - but it does make >> things >>>>> easier when icu-config exists... >>>>> >>>>> Debian users suggest migrating to using pkg-config instead but that >> doen't >>>>> seem to be portable or feasible without adding a new dependency on >>>>> pkg-config in python... >>>>> >>>>> Thanks ! >>>>> >>>>> Andi.. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> icu-support mailing list - icu...@li... >>>>> To Un/Subscribe: >> https://lists.sourceforge.net/lists/listinfo/icu-support >>>>> Archives/Project >>>>> < >> https://lists.sourceforge.net/lists/listinfo/icu-supportArchives/Project> >>>>> Info: http://site.icu-project.org/contacts >>>>> >>>> >>> >>> >>> _______________________________________________ >>> icu-support mailing list - icu...@li... >>> To Un/Subscribe: >> https://lists.sourceforge.net/lists/listinfo/icu-support >>> Archives/Project Info: http://site.icu-project.org/contacts >> > |