Re: [PATCH 0/4] Improve pylibfdt python packaging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Nov 10, 2021 at 07:11:31PM -0600, Rob Herring wrote:
> I'm interested in getting pylibfdt into PyPI and ran into a few issues
> with pylibfdt using the python packaging tools. Primarily, pip didn't
> work nor did setup.py sdist and bdist_wheel subcommands. This series
> fixes those issues.
> 
> I've left meson calling setup.py intact for now, but think it's the
> wrong way around. In fact, there's actually some efforts to make meson
> the backend for pip/setuptools. I made several attempts to completely
> eliminate putting files in the source tree without success. Also, I
> noticed a meson install builds pylibfdt twice (though make may too).
> 
> I don't think I broke anything. Tests and installs both work with make
> and meson.

Applied, it certainly looks better to me.

However, I've just spotted another nasty problem.  I think it must
have started with moving to Fedora 35 on my laptop.  A bunch of the
Python tests now fail like this:

======================================================================
ERROR: testGetIntProperties (__main__.PyLibfdtBasicTests)
Test that we can access properties as integers
----------------------------------------------------------------------
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/dwg/src/dtc/tests/./pylibfdt_tests.py", line 378, in testGetIntProperties
    self.assertEqual(0xdeadbeef, self.get_prop("prop-hex32").as_uint32())
  File "/home/dwg/src/dtc/tests/./pylibfdt_tests.py", line 374, in get_prop
    return self.fdt2.getprop(0, name)
  File "/home/dwg/src/dtc/tests/../pylibfdt/libfdt.py", line 451, in getprop
    pdata = check_err_null(fdt_getprop(self._fdt, nodeoffset, prop_name),
  File "/home/dwg/src/dtc/tests/../pylibfdt/libfdt.py", line 1279, in fdt_getprop
    return _libfdt.fdt_getprop(fdt, nodeoffset, name)
SystemError: <built-in function fdt_getprop> returned a result with an exception set

Any ideas?

Also, Rob, did you have patches to finish the conversion of the
Makefiles to wrappers around meson?  If so, I'm sorry I've lost track
of them.  Can you repost please?  That README addition with meson
native building instructions would also be really good to have.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux