openzim / python-libzim

Libzim binding for Python: read/write ZIM files in Python
https://pypi.org/project/libzim/
GNU General Public License v3.0
62 stars 20 forks source link

Warnings are a bit annoying if libzim is installed system-wide #70

Closed legoktm closed 2 years ago

legoktm commented 4 years ago

I'm working on the Debian packaging for python-libzim. It builds against libzim-dev, which is installed to /usr/include/zim. The build process correctly finds it and builds properly (yay!) but it annoyingly constantly puts out warnings like:

[!] Warning: Couldn't find zim/*.h in ./include!
    Hint: You can install them from source from https://github.com/openzim/libzim
          or download a prebuilt release's headers into ./include/zim/*.h
          (or set CFLAGS='-I<library_path>/include')
[!] Warning: Couldn't find libzim.so in ./lib or system library paths!    Hint: You can install it from source from https://github.com/openzim/libzim
          or download a prebuilt libzim.so release into ./lib.
          (or set LDFLAGS='-L<library_path>/lib/[x86_64-linux-gnu]')

Could we suppress the warnings if CFLAGS/LDFLAGS are set in the environment?

kelson42 commented 4 years ago

@rgaudin @legoktm IMO it should just work even without explict CFLAGS as the headers are in the default system place.

mgautierfr commented 4 years ago

This is working. It is just that we print a warning if the headers/library are not in the local directory tree.

legoktm commented 4 years ago

Yep, everything builds fine, it's just that the warnings are annoying because there's nothing actionable about them.

kelson42 commented 4 years ago

@rgaudin @mgautierfr I don't understand the warning either here. I think it would be better to: