python-prctl icon indicating copy to clipboard operation
python-prctl copied to clipboard

Test for libcap and gcc isn't robust enough

Open hmaarrfk opened this issue 4 years ago • 3 comments

When trying to build the package on a non-standard system, the helpful error messages make the build process fail prematurely.

The issue is that on certain build system, one needs to specify the CFLAGS and other related parameters for gcc or cpp to find the appropriate headers.

This happens on conda-forge where I had to patch out the checks during the install procedure.

I understand that these are meant to guide to the user into installing the project correctly, but maybe we can decrease them to warnings?

Let me know how I can help.

Reference to some failing build logs (for unrelated issues)

https://github.com/conda-forge/staged-recipes/pull/16926

hmaarrfk avatar Nov 13 '21 18:11 hmaarrfk

For the kernel checks, there's an envvar you can set to bypass them. I'd accept a pr that does something similar for the compiler/header checks.

seveas avatar Nov 13 '21 19:11 seveas

interesting. ok. i can probably do that.

also, i think you need kernel 2.6 now that you have FORCE

https://github.com/seveas/python-prctl/blob/9d4b8215fef64a236f0eb8e7f814ec355f9863c8/_prctlmodule.c#L190

you might also be able to distribute wheels. i think the standard might define a Linux version that is old enough for your project.

hmaarrfk avatar Nov 13 '21 19:11 hmaarrfk

I had a serious brainfart with the kernel version.

I guess conda-forge does a few hacky things like they may install a new kernel, but expose older kernel versions to the libraries. I got things working on our system.

hmaarrfk avatar Nov 13 '21 20:11 hmaarrfk