mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Lars Pedersen <lapeddk@gmail.com>
To: Michael Olbrich <m.olbrich@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/4] host-python3-setuptools-scm: Version bump 4.1.2 -> 8.1.0
Date: Thu, 3 Oct 2024 11:16:26 +0200	[thread overview]
Message-ID: <CAKd8=GtU3bRR1e8xvYiSAv-C=_okREG1CQpLD0PFqWV1Lyspsg@mail.gmail.com> (raw)
In-Reply-To: <ZvpGF6Mi3FcMAFLb@pengutronix.de>

On Mon, 30 Sept 2024 at 08:32, Michael Olbrich <m.olbrich@pengutronix.de> wrote:
>
> On Fri, Sep 27, 2024 at 01:38:28PM +0200, Lars Pedersen wrote:
> > Signed-off-by: Lars Pedersen <lapeddk@gmail.com>
> > ---
> >  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 |



  reply	other threads:[~2024-10-03  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-27 11:38 [ptxdist] [PATCH 1/4] python3-zipp: version bump 3.1.0 -> 3.20.1 Lars Pedersen
2024-09-27 11:38 ` [ptxdist] [PATCH 2/4] host-python3-setuptools-scm: Version bump 4.1.2 -> 8.1.0 Lars Pedersen
2024-09-30  6:32   ` Michael Olbrich
2024-10-03  9:16     ` Lars Pedersen [this message]
2024-10-16 10:49       ` Michael Olbrich
2024-09-27 11:38 ` [ptxdist] [PATCH 3/4] python3-importlib-metadata: Version bump 1.7.0 -> 8.4.0 Lars Pedersen
2024-09-27 11:38 ` [ptxdist] [PATCH 4/4] python3-yoyo-migrations: Version bump 7.3.2 -> 8.2.0 Lars Pedersen

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='CAKd8=GtU3bRR1e8xvYiSAv-C=_okREG1CQpLD0PFqWV1Lyspsg@mail.gmail.com' \
    --to=lapeddk@gmail.com \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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