From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Marcus Hoffmann <buildroot@bubu1.eu>
Cc: James Hilliard <james.hilliard1@gmail.com>,
Marcus Hoffmann <bubu@bubu1.eu>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] package/python-diskcache: new package
Date: Tue, 21 Oct 2025 12:16:09 +0200 [thread overview]
Message-ID: <20251021121609.2a9d08be@windsurf> (raw)
In-Reply-To: <20251021093500.744569-1-buildroot@bubu1.eu>
Hello Marcus,
On Tue, 21 Oct 2025 11:35:00 +0200
Marcus Hoffmann <buildroot@bubu1.eu> wrote:
> The package imports itself in setup.py to get the package-name and
> version number. This doesn't work during the buildroot build, so we
> replace this by the hardcoded package-name and the version number stored
> in buildroot.
>
> Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Sounds good overall. One question below.
> diff --git a/package/python-diskcache/python-diskcache.mk b/package/python-diskcache/python-diskcache.mk
> new file mode 100644
> index 0000000000..327d076779
> --- /dev/null
> +++ b/package/python-diskcache/python-diskcache.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# python-diskcache
> +#
> +################################################################################
> +
> +PYTHON_DISKCACHE_VERSION = 5.6.3
> +PYTHON_DISKCACHE_SOURCE = diskcache-$(PYTHON_DISKCACHE_VERSION).tar.gz
> +PYTHON_DISKCACHE_SITE = https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6
> +PYTHON_DISKCACHE_SETUP_TYPE = setuptools
> +PYTHON_DISKCACHE_LICENSE = Apache-2.0
License is OK, checked here.
> +PYTHON_DISKCACHE_LICENSE_FILES = LICENSE
> +
> +define PYTHON_DISKCACHE_REMOVE_SELF_IMPORT
> + sed -i -e '/import diskcache/d' -e 's/diskcache.__title__/"diskcache"/' -e 's/diskcache.__version__/"$(PYTHON_DISKCACHE_VERSION)"/' $(@D)/setup.py
> +endef
This could use some splitting:
sed -i -e '/import diskcache/d' \
-e 's/diskcache.__title__/"diskcache"/' \
-e 's/diskcache.__version__/"$(PYTHON_DISKCACHE_VERSION)"/' \
$(@D)/setup.py
but perhaps more importantly, has this been reported upstream? How can
this even work? You need the thing installed... before you install it?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-10-21 10:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 9:35 [Buildroot] [PATCH v2] package/python-diskcache: new package Marcus Hoffmann via buildroot
2025-10-21 9:40 ` Marcus Hoffmann via buildroot
2025-10-21 10:16 ` Thomas Petazzoni via buildroot [this message]
2025-10-21 11:31 ` Marcus Hoffmann via buildroot
2025-10-21 11:41 ` Thomas Petazzoni via buildroot
2025-10-21 12:07 ` Marcus Hoffmann via buildroot
-- strict thread matches above, loose matches on Subject: below --
2025-02-26 12:20 Marcus Hoffmann via buildroot
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=20251021121609.2a9d08be@windsurf \
--to=buildroot@buildroot.org \
--cc=bubu@bubu1.eu \
--cc=buildroot@bubu1.eu \
--cc=james.hilliard1@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/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.