On Mon, Sep 21, 2020 at 02:32:53PM +0200, Bastian Krause wrote:
> Signed-off-by: Bastian Krause <[email protected]>
> ---
> 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-@[email protected]:
> +     @$(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
> [email protected]
> To unsubscribe, send a mail with subject "unsubscribe" to 
> [email protected]
> 

-- 
Roland Hieber, Pengutronix e.K.          | [email protected]     |
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
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to