From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Bastian Krause <bst@pengutronix.de>
Subject: Re: [ptxdist] [PATCH v2 03/18] package templates: add python3-pypi template
Date: Tue, 22 Sep 2020 10:09:38 +0200 [thread overview]
Message-ID: <20200922080938.GC11021@pengutronix.de> (raw)
In-Reply-To: <20200921213103.dkqhnl6jww4ewlhj@pengutronix.de>
On Mon, Sep 21, 2020 at 11:31:03PM +0200, Roland Hieber wrote:
> On Mon, Sep 21, 2020 at 02:32:53PM +0200, Bastian Krause wrote:
> > Signed-off-by: Bastian Krause <bst@pengutronix.de>
> > ---
> > No previous version.
> > ---
> > rules/templates/template-python3-pypi-in | 8 ++++
> > rules/templates/template-python3-pypi-make | 51 ++++++++++++++++++++++
> > scripts/lib/ptxd_lib_template.sh | 10 +++++
> > 3 files changed, 69 insertions(+)
> > create mode 100644 rules/templates/template-python3-pypi-in
> > create mode 100644 rules/templates/template-python3-pypi-make
> >
> > diff --git a/rules/templates/template-python3-pypi-in b/rules/templates/template-python3-pypi-in
> > new file mode 100644
> > index 000000000..5f758f5bd
> > --- /dev/null
> > +++ b/rules/templates/template-python3-pypi-in
> > @@ -0,0 +1,8 @@
> > +## SECTION=python3
> > +
> > +config PYTHON3_@PACKAGE@
> > + tristate
> > + select PYTHON3
> > + prompt "@package@"
> > + help
> > + FIXME
> > diff --git a/rules/templates/template-python3-pypi-make b/rules/templates/template-python3-pypi-make
> > new file mode 100644
> > index 000000000..9bd8cec6d
> > --- /dev/null
> > +++ b/rules/templates/template-python3-pypi-make
> > @@ -0,0 +1,51 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) @YEAR@ by @AUTHOR@
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_PYTHON3_@PACKAGE@) += python3-@package@
> > +
> > +#
> > +# Paths and names
> > +#
> > +PYTHON3_@PACKAGE@_VERSION := @VERSION@
> > +PYTHON3_@PACKAGE@_MD5 :=
> > +PYTHON3_@PACKAGE@ := @package@-$(PYTHON3_@PACKAGE@_VERSION)
> > +PYTHON3_@PACKAGE@_SUFFIX := tar.gz
> > +PYTHON3_@PACKAGE@_URL := $(call ptx/mirror-pypi, @package@, $(PYTHON3_@PACKAGE@).$(PYTHON3_@PACKAGE@_SUFFIX))
> > +PYTHON3_@PACKAGE@_SOURCE := $(SRCDIR)/$(PYTHON3_@PACKAGE@).$(PYTHON3_@PACKAGE@_SUFFIX)
> > +PYTHON3_@PACKAGE@_DIR := $(BUILDDIR)/$(PYTHON3_@PACKAGE@)
> > +PYTHON3_@PACKAGE@_LICENSE := unknown
> > +
> > +# ----------------------------------------------------------------------------
> > +# Prepare
> > +# ----------------------------------------------------------------------------
> > +
> > +PYTHON3_@PACKAGE@_CONF_TOOL := python3
>
> Please add a balancing empty line here... :)
Indeed.
> > +# ----------------------------------------------------------------------------
> > +# Target-Install
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/python3-@package@.targetinstall:
> > + @$(call targetinfo)
> > +
> > + @$(call install_init, python3-@package@)
> > + @$(call install_fixup, python3-@package@,PRIORITY,optional)
> > + @$(call install_fixup, python3-@package@,SECTION,base)
> > + @$(call install_fixup, python3-@package@,AUTHOR,"@AUTHOR@")
> > + @$(call install_fixup, python3-@package@,DESCRIPTION,missing)
> > +
> > + @$(call install_glob, python3-@package@, 0, 0, -, \
> > + $(PYTHON3_SITEPACKAGES),, *.py)
> > +
> > + @$(call install_finish, python3-@package@)
> > +
> > + @$(call touch)
> > +
> > +# vim: syntax=make
> > diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh
> > index 5fdb805eb..f3f03a8d1 100644
> > --- a/scripts/lib/ptxd_lib_template.sh
> > +++ b/scripts/lib/ptxd_lib_template.sh
> > @@ -407,6 +407,16 @@ export -f ptxd_template_new_cross
> > ptxd_template_help_list[${#ptxd_template_help_list[@]}]="cross"
> > ptxd_template_help_list[${#ptxd_template_help_list[@]}]="create cross development package"
> >
> > +ptxd_template_new_python3_pypi() {
> > + ptxd_template_read_basic &&
> > + ptxd_template_read_author
> > + package_filename="python3-${package_filename}"
> > + ptxd_template_write_rules
> > +}
> > +export -f ptxd_template_new_python3_pypi
> > +ptxd_template_help_list[${#ptxd_template_help_list[@]}]="python3-pypi"
>
> I think we could also just call it "pypi", or "pypi3", but it's not that
> important.
I think I prefer python3-pypi. Or maybe turn this into a generic 'python3'
template: Use the pypi URL as default when prompting for the URL.
Michael
> Otherwise the patch looks good to me.
>
> - Roland
>
> > +ptxd_template_help_list[${#ptxd_template_help_list[@]}]="create python3-pypi package for embedded target"
> > +
> > ptxd_template_new_src_autoconf_lib() {
> > ptxd_template_autoconf_base
> > }
> > --
> > 2.28.0
--
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 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2020-09-22 8:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 12:32 [ptxdist] [PATCH v2 01/18] setup: introduce pypi mirror Bastian Krause
2020-09-21 12:32 ` [ptxdist] [PATCH v2 02/18] rules/pre/mirror: add ptx/mirror-pypi Bastian Krause
2020-09-21 12:32 ` [ptxdist] [PATCH v2 03/18] package templates: add python3-pypi template Bastian Krause
2020-09-21 21:31 ` Roland Hieber
2020-09-22 8:09 ` Michael Olbrich [this message]
2020-09-21 12:32 ` [ptxdist] [PATCH v2 04/18] python3-async-timeout: version bump 2.0.0 -> 3.0.1 Bastian Krause
2020-09-21 12:32 ` [ptxdist] [PATCH v2 05/18] python3-chardet: version bump 2.3.0 -> 3.0.4 Bastian Krause
2020-09-21 12:32 ` [ptxdist] [PATCH v2 06/18] python3-attrs: version bump 19.3.0 -> 20.2.0 Bastian Krause
2020-09-21 12:32 ` [ptxdist] [PATCH v2 07/18] python3-idna: new package Bastian Krause
2020-09-21 12:32 ` [ptxdist] [PATCH v2 08/18] python3-yarl: version bump 0.8.1 -> 1.5.1 Bastian Krause
2020-09-21 12:32 ` [ptxdist] [PATCH v2 09/18] python3-multidict: version bump 2.1.4 -> 4.7.6 Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 10/18] python3-aiohttp: mark dependencies as RUNTIME Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 11/18] python3-aiohttp: add missing PYTHON3_ATTRS runtime dependency Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 12/18] python3-aiohttp: version bump 3.4.4 -> 3.6.2 Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 13/18] python3-aiohttp-wsgi: version bump 0.2.5 -> 0.8.2 Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 14/18] python3-markupsafe: new package Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 15/18] python3-jinja2: " Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 16/18] python3-pytz: version bump 2018.5 -> 2020.1 Bastian Krause
2020-09-21 12:58 ` [ptxdist] ?==?utf-8?q? ?==?utf-8?q? [PATCH v2 16/18]?==?utf-8?q? python3-pytz: version bump 2018.5?==?utf-8?q? ->?==?utf-8?q? 2020.1 Artur Wiebe
2020-09-22 8:13 ` [ptxdist] ?= [PATCH v2 16/18] python3-pytz: version bump 2018.5 ->=?utf-8?q? 2020.1 Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 17/18] python3-sqlparse: new package Bastian Krause
2020-09-21 12:33 ` [ptxdist] [PATCH v2 18/18] python3-django: version bump 1.8.7 -> 2.2.16 Bastian Krause
2020-09-22 11:49 ` Michael Olbrich
2020-09-22 12:00 ` Bastian Krause
2020-09-21 21:28 ` [ptxdist] [PATCH v2 01/18] setup: introduce pypi mirror Roland Hieber
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=20200922080938.GC11021@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=bst@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