From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Mon, 21 Sep 2020 23:31:03 +0200 From: Roland Hieber Message-ID: <20200921213103.dkqhnl6jww4ewlhj@pengutronix.de> References: <20200921123308.25821-1-bst@pengutronix.de> <20200921123308.25821-3-bst@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200921123308.25821-3-bst@pengutronix.de> Subject: Re: [ptxdist] [PATCH v2 03/18] package templates: add python3-pypi template List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: Bastian Krause Cc: ptxdist@pengutronix.de On Mon, Sep 21, 2020 at 02:32:53PM +0200, Bastian Krause wrote: > Signed-off-by: Bastian Krause > --- > 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... :) > +# ---------------------------------------------------------------------------- > +# 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. 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 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://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