devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	David Gibson
	<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: "Simon Glass" <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"Devicetree Compiler"
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Marc-André Lureau"
	<marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Bruce Ashfield"
	<bruce.ashfield-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 0/4] Improve pylibfdt python packaging
Date: Thu, 11 Nov 2021 09:22:56 -0500	[thread overview]
Message-ID: <bcce25e8-cee3-0ad7-625c-a5a887ab373a@xilinx.com> (raw)
In-Reply-To: <CAL_JsqJ1gSzVH1OYU6kPCYDfg32j8whCKaOmo2VU8hsUFsJZuQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 11/11/2021 9:08 AM, Rob Herring wrote:
> On Wed, Nov 10, 2021 at 9:41 PM David Gibson
> <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
>>
>> 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?
> 
> Python 3.10? Only guessing because I'm on 3.9. Otherwise, I have no clue.
> 

FWIW, and in case you haven't already sorted it out.

We just fixed this in the yocto integration of dtc/libfdt this
morning (I case the patch hasn't made it upstream to you yet).

It is indeed python 3.10, and in particular:

https://docs.python.org/3.10/whatsnew/3.10.html#id2

(and again, a patch should arrive shortly if it hasn't already).

Cheers,

Bruce

> I was going to look at making '.setup.py test' work as testing is
> intertwined with meson too. Most python CI testing runs against a
> matrix of python versions which would help here.
> 
>> Also, Rob, did you have patches to finish the conversion of the
>> Makefiles to wrappers around meson?
> 
> That was Marc-André...
> 
>> If so, I'm sorry I've lost track
>> of them.  Can you repost please?
> 
> One of the issues you had with Travis CI. Are you still using Travis
> CI after their move? I found it easier to just move to GH workflows
> than move given I always seem to hit login token issues (maybe that's
> just group projects with multiple users).
> 
>> That README addition with meson
>> native building instructions would also be really good to have.
> 
> I can look at that. It's gotten a bit more straight-forward with newer
> meson versions as you don't have to run ninja directly. So it is just:
> 
> One-time init:
> meson <builddir>
> 
> And then:
> meson compile|test|install -C <builddir>
> 
> (I find specifying the builddir every time pretty annoying. Guess I
> need a wrapper script.)
> 
> Rob
> 


  parent reply	other threads:[~2021-11-11 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  1:11 [PATCH 0/4] Improve pylibfdt python packaging Rob Herring
     [not found] ` <20211111011135.2386773-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-11-11  1:11   ` [PATCH 1/4] pylibfdt: Use setuptools instead of distutils Rob Herring
2021-11-11  1:11   ` [PATCH 2/4] pylibfdt: Use setuptools_scm for the version Rob Herring
2021-11-11  1:11   ` [PATCH 3/4] pylibfdt: Split setup.py author name and email Rob Herring
2021-11-11  1:11   ` [PATCH 4/4] pylibfdt: Move setup.py to the top level Rob Herring
2021-11-11  3:41   ` [PATCH 0/4] Improve pylibfdt python packaging David Gibson
2021-11-11 14:08     ` Rob Herring
     [not found]       ` <CAL_JsqJ1gSzVH1OYU6kPCYDfg32j8whCKaOmo2VU8hsUFsJZuQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-11-11 14:22         ` Bruce Ashfield [this message]
2021-11-12  2:43         ` David Gibson
2021-11-12  4:01           ` Rob Herring
     [not found]             ` <CAL_JsqLuUMH16mow8bmYiPB60Cbci1cN_RhV3npYSqQzPhp97A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-11-13  3:19               ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcce25e8-cee3-0ad7-625c-a5a887ab373a@xilinx.com \
    --to=bruce.ashfield-gjffaj9ahvfqt0dzr+alfa@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marcandre.lureau-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).