wiktor-k / pysequoia

OpenPGP in Python using Sequoia PGP
https://pypi.org/project/pysequoia/
Apache License 2.0
9 stars 2 forks source link

friendly error message when missing pcsc-lite-devel #26

Closed ktdreyer closed 4 months ago

ktdreyer commented 4 months ago

When I'm compiling locally and I don't have nettle-devel installed on Fedora, it's really nice that the error message shows a friendly dnf install command for me.

  Building nettle-sys failed.
  Because: 
  pkg-config exited with status code 1
  > PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags nettle

  The system library `nettle` required by crate `nettle-sys` was not found.
  The file `nettle.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  The PKG_CONFIG_PATH environment variable is not set.

  HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `nettle.pc`.

  Please make sure the necessary build dependencies are installed.

  If you are using Debian (or a derivative), try:

      $ sudo apt install clang llvm pkg-config nettle-dev

  If you are using Arch (or a derivative), try:

      $ sudo pacman -S clang pkg-config nettle --needed

  If you are using Fedora (or a derivative), try:

      $ sudo dnf install clang pkg-config nettle-devel

  See https://gitlab.com/sequoia-pgp/nettle-sys#building for more information.

  Error: "Building nettle-sys failed."
warning: build failed, waiting for other jobs to finish...
💥 maturin failed

Can we do the same when pcsc-lite-devel is missing on Fedora?

wiktor-k commented 4 months ago

That's a good idea although I think it should go into https://github.com/bluetech/pcsc-rust (just like nettle-sys prints this message, not pysequoia).

If you'd like to create an issue there with the text that you have here it'd be the best. If not I can do so tomorrow.

Have a nice day! 👋

ktdreyer commented 4 months ago

Thank you, I've reported it at https://github.com/bluetech/pcsc-rust/issues/51