All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@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: Fri, 12 Nov 2021 13:43:15 +1100	[thread overview]
Message-ID: <YY3Uw3xLCd5dHqoP@yekko> (raw)
In-Reply-To: <CAL_JsqJ1gSzVH1OYU6kPCYDfg32j8whCKaOmo2VU8hsUFsJZuQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 4259 bytes --]

On Thu, Nov 11, 2021 at 08:08:08AM -0600, 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.

It appears so; I've now merged Ross Burton's fix.

> 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é...

Oops, sorry, I got confused.

> > 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).

It stopped working after the move, and I haven't looked into what
would be needed to make it go again.  I was actually thinking I'd move
over to GitLan - I'm more familiar with its CI stuff from qemu, and I
like what I've seen.  I haven't actually had a chance to do anything
on that front, though.

> > 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.)

Yeah, I tend to agree.

-- 
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-11-12  2:43 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
2021-11-12  2:43         ` David Gibson [this message]
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=YY3Uw3xLCd5dHqoP@yekko \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=bruce.ashfield-gjFFaj9aHVfQT0dZR+AlfA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.