On Thu, 05 Dec 2024 at 19:00:50 -0700, Soren Stoutner wrote:
> I am working on PyInstaller, which is mostly written in Python, but compiles 
> a 
> bootloader written in c.  blhc failes because the [logs] do not contain 
> verbose 
> compile flags.

You'll need to look at the implementation of the build for the C part, and
then do whatever is most appropriate for that build system.

>From a quick glance at setup.py, it seems to be (a vendored copy of) waf:

        additional_args = os.getenv('PYINSTALLER_BOOTLOADER_WAF_ARGS', 
'').strip().split()
        cmd = [sys.executable, './waf', 'configure', 'all']
        cmd += additional_args

so hopefully there is something you can add to
PYINSTALLER_BOOTLOADER_WAF_ARGS that would make waf verbose, analogous
to `ninja -v` or Autotools `V=1`?

After that, you'll also need to make sure that the intended build
options are actually used (I don't know whether waf uses CFLAGS, etc. by
default or has to be given them via waf-specific command-line options).
Looking at other packages that use a waf build system and implement build
flags correctly, if any such packages exist, will probably be useful.

We have had problems with waf in the past, both technical and social
(licensing-related and others), so please be careful to ensure that
this package meets Debian's quality standards and doesn't contain any
particularly attractive places to hide malware.

In particular, the recommended way to distribute waf-built code used to
be to vendor a generated script containing a bzip2-compressed tarball,
which is not straightforward to review or patch, and the ftp team does
not consider this to be acceptable in Debian [1]. Is this still the case,
or is PyInstaller redistributing waf as reviewable/patchable files in
something more closely resembling their preferred form for modification?

Has the maintainer of this package (possibly you, I don't know this
package's history) verified that the included copy of waf is something
that we can trust? From the fact that you didn't already know this
package is using waf, I would guess perhaps not?

I can't help wondering whether its upstream would be receptive to the idea
of using Meson with meson-python as a replacement for both setuptools
and waf, which is what I would personally do if I had a Python module
that needed to compile/include C code (and indeed is what I *did* do
in dbus-python).

Good luck!

    smcv

[1] https://wiki.debian.org/UnpackWaf

Reply via email to