ovalhub / pyicu

The PyICU project repository has moved to https://pyicu.org.
Other
133 stars 49 forks source link

Getting ICU_VERSION in setup.py doesn't work on Ubuntu 19.04 with installed libicu-dev and pkg-config #108

Closed MrYoda closed 5 years ago

MrYoda commented 5 years ago

icu-config command was disappeared from new Debian/UBuntu ICU dev packages (e.g. 19.04). I think there is icuinfo command instead of old icu-config and it returns XML now. Also, nested try-except block in setup.py doesn't work too - it try not to execute pkg-config after exception in icu-config executing block.

ovalhub commented 5 years ago

On Mon, 19 Aug 2019, Anton Kuzmichev wrote:

icu-config command was disappeared from new Debian/UBuntu ICU dev packages (e.g. 19.04). I think there is icuinfo command instead of old icu-config and it returns XML now.

Yes, icu-config is deprecated and is disappearing. It's still supported in setup.py for people using PyICU with old versions of ICU. The "normal" situation now is using pkg-config instead.

Also, nested try-except block in setup.py doesn't work too - it try not to execute pkg-config after exception in icu-config executing block.

What version of PyICU are you using ? I did test the fallback to pkg-config and it worked when I tried it. What part of this code is not working ? try: if CONFIGURE_WITH_ICU_CONFIG[platform]: try: configure_with_icu_config( _cflags, ('--cxxflags', '--cppflags'), 'CFLAGS') except: if CONFIGURE_WITH_PKG_CONFIG[platform]: configure_with_pkg_config(_cflags, ('--cflags',), 'CFLAGS') else: raise elif CONFIGURE_WITH_PKG_CONFIG[platform]: configure_with_pkg_config(_cflags, ('--cflags',), 'CFLAGS') except: if not _cflags: raise RuntimeError(''' Please install pkg-config on your system or set the PYICU_CFLAGS environment variable to the flags required by the C++ compiler to find the header files for ICU, and possibly -std=c++11 if using ICU version >= 60 ''')

Andi..

ovalhub commented 5 years ago

no activity