On Mon, 30 Sept 2024 at 08:32, Michael Olbrich <[email protected]> wrote: > > On Fri, Sep 27, 2024 at 01:38:28PM +0200, Lars Pedersen wrote: > > Signed-off-by: Lars Pedersen <[email protected]> > > --- > > rules/host-python3-setuptools-scm.make | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/rules/host-python3-setuptools-scm.make > > b/rules/host-python3-setuptools-scm.make > > index f413d7b35..0146fa9cd 100644 > > --- a/rules/host-python3-setuptools-scm.make > > +++ b/rules/host-python3-setuptools-scm.make > > @@ -14,8 +14,8 @@ HOST_PACKAGES-$(PTXCONF_HOST_PYTHON3_SETUPTOOLS_SCM) += > > host-python3-setuptools- > > # > > # Paths and names > > # > > -HOST_PYTHON3_SETUPTOOLS_SCM_VERSION := 4.1.2 > > -HOST_PYTHON3_SETUPTOOLS_SCM_MD5 := > > e6c9fad17c90516d640868eb833d5150 > > +HOST_PYTHON3_SETUPTOOLS_SCM_VERSION := 8.1.0 > > +HOST_PYTHON3_SETUPTOOLS_SCM_MD5 := > > d8046dce093a94dc382b68b45f6a6257 > > HOST_PYTHON3_SETUPTOOLS_SCM := > > setuptools_scm-$(HOST_PYTHON3_SETUPTOOLS_SCM_VERSION) > > HOST_PYTHON3_SETUPTOOLS_SCM_SUFFIX := tar.gz > > HOST_PYTHON3_SETUPTOOLS_SCM_URL := $(call ptx/mirror-pypi, > > setuptools_scm, > > $(HOST_PYTHON3_SETUPTOOLS_SCM).$(HOST_PYTHON3_SETUPTOOLS_SCM_SUFFIX)) > > @@ -29,4 +29,12 @@ HOST_PYTHON3_SETUPTOOLS_SCM_LICENSE := MIT > > > > HOST_PYTHON3_SETUPTOOLS_SCM_CONF_TOOL := python3 > > > > +# Patch in version by removing multiline dynamic = [ "version" ] (line 39 > > to 41) and add static version after project name > > +$(STATEDIR)/host-python3-setuptools-scm.extract.post: > > + @$(call targetinfo) > > + @$(call world/patchin/post, HOST_PYTHON3_SETUPTOOLS_SCM) > > + @sed -i '39,41d' $(HOST_PYTHON3_SETUPTOOLS_SCM_DIR)/pyproject.toml > > Hmmm, I don't like this because it won't break if the stuff we want to > remove, moves to a different place in the file. > > > + @sed -i '/^name =/aversion = > > "$(HOST_PYTHON3_SETUPTOOLS_SCM_VERSION)"' > > $(HOST_PYTHON3_SETUPTOOLS_SCM_DIR)/pyproject.toml > > We're collecting multiple packages now that have this kind of hack. I need > to dig into this. We need a better solution for this. What does this > 'dynamic = [ "version" ]' stuff do anyways, that we want to avoid? > > Michael > I don't fully understand this myself. It seems like the dynamic = ["version"} tells the compiler backend (guess that is setuptools) to find version in different/smart/magic ways. I have yet to find a good explanation, but the ptxdist compile stage will fail if it is unable to find a version for the package.
/Lars Pedersen > > + @$(call touch) > > + > > # vim: syntax=make > > -- > > 2.46.1 > > > > > > > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
