* [ptxdist] [PATCH] python3-yoyo-migrations: new package
@ 2019-11-19 15:06 Lars Pedersen
2019-11-21 15:35 ` Roland Hieber
0 siblings, 1 reply; 2+ messages in thread
From: Lars Pedersen @ 2019-11-19 15:06 UTC (permalink / raw)
To: ptxdist; +Cc: Lars Pedersen
Signed-off-by: Lars Pedersen <lapeddk@gmail.com>
---
rules/python3-yoyo-migrations.in | 11 +++++
rules/python3-yoyo-migrations.make | 76 ++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+)
create mode 100644 rules/python3-yoyo-migrations.in
create mode 100644 rules/python3-yoyo-migrations.make
diff --git a/rules/python3-yoyo-migrations.in b/rules/python3-yoyo-migrations.in
new file mode 100644
index 000000000..fa58c9952
--- /dev/null
+++ b/rules/python3-yoyo-migrations.in
@@ -0,0 +1,11 @@
+## SECTION=python3
+
+config PYTHON3_YOYO_MIGRATIONS
+ tristate
+ prompt "python3-yoyo-migrations"
+ select PYTHON3
+ select HOST_PYTHON3_SETUPTOOLS
+ select PYTHON3_INIHERIT
+ select PYTHON3_TEXT_UNIDECODE
+ help
+ Yoyo is a database schema migration tool using python.
diff --git a/rules/python3-yoyo-migrations.make b/rules/python3-yoyo-migrations.make
new file mode 100644
index 000000000..20e2825ee
--- /dev/null
+++ b/rules/python3-yoyo-migrations.make
@@ -0,0 +1,76 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Lars Pedersen <lapeddk@gmail.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_YOYO_MIGRATIONS) += python3-yoyo-migrations
+
+#
+# Paths and names
+#
+PYTHON3_YOYO_MIGRATIONS_VERSION := 6.1.0
+PYTHON3_YOYO_MIGRATIONS_MD5 := b91476050b685c4cfe4644217c89e8b3
+PYTHON3_YOYO_MIGRATIONS := yoyo-migrations-$(PYTHON3_YOYO_MIGRATIONS_VERSION)
+PYTHON3_YOYO_MIGRATIONS_SUFFIX := tar.gz
+PYTHON3_YOYO_MIGRATIONS_URL := https://files.pythonhosted.org/packages/source/y/yoyo-migrations/$(PYTHON3_YOYO_MIGRATIONS).$(PYTHON3_YOYO_MIGRATIONS_SUFFIX)
+PYTHON3_YOYO_MIGRATIONS_SOURCE := $(SRCDIR)/$(PYTHON3_YOYO_MIGRATIONS).$(PYTHON3_YOYO_MIGRATIONS_SUFFIX)
+PYTHON3_YOYO_MIGRATIONS_DIR := $(BUILDDIR)/$(PYTHON3_YOYO_MIGRATIONS)
+PYTHON3_YOYO_MIGRATIONS_LICENSE := Apache-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_YOYO_MIGRATIONS_CONF_TOOL := python3
+PYTHON3_YOYO_MIGRATIONS_MAKE_OPT := install_scripts
+
+# ----------------------------------------------------------------------------
+# Install post
+# ----------------------------------------------------------------------------
+
+# Fix python shebang from absolute in yoyo and yoyo-migrate install_scripts
+$(STATEDIR)/python3-yoyo-migrations.install.post:
+ @$(call targetinfo)
+ @sed -i -e '1s,^.*$$,\#\!\/usr\/bin\/python3,g' "$(PTXDIST_PLATFORMDIR)/packages/$(PYTHON3_YOYO_MIGRATIONS)/usr/bin/yoyo"
+ @sed -i -e '1s,^.*$$,\#\!\/usr\/bin\/python3,g' "$(PTXDIST_PLATFORMDIR)/packages/$(PYTHON3_YOYO_MIGRATIONS)/usr/bin/yoyo-migrate"
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-yoyo-migrations.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python3-yoyo-migrations)
+ @$(call install_fixup, python3-yoyo-migrations,PRIORITY,optional)
+ @$(call install_fixup, python3-yoyo-migrations,SECTION,base)
+ @$(call install_fixup, python3-yoyo-migrations,Lars Pedersen,"<lapeddk@gmail.com>")
+ @$(call install_fixup, python3-yoyo-migrations,DESCRIPTION,missing)
+
+ @$(call install_glob,python3-yoyo-migrations, 0, 0, -, \
+ /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages,, *.py)
+
+ @$(call install_copy, python3-yoyo-migrations, 0, 0, 0775, -, /usr/bin/yoyo)
+ @$(call install_copy, python3-yoyo-migrations, 0, 0, 0775, -, /usr/bin/yoyo-migrate)
+
+ @$(call install_finish, python3-yoyo-migrations)
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/python3-yoyo-migrations.clean:
+# @$(call targetinfo)
+# @$(call clean_pkg, PYTHON3_YOYO_MIGRATIONS)
+
+# vim: syntax=make
--
2.23.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [PATCH] python3-yoyo-migrations: new package
2019-11-19 15:06 [ptxdist] [PATCH] python3-yoyo-migrations: new package Lars Pedersen
@ 2019-11-21 15:35 ` Roland Hieber
0 siblings, 0 replies; 2+ messages in thread
From: Roland Hieber @ 2019-11-21 15:35 UTC (permalink / raw)
To: Lars Pedersen; +Cc: ptxdist
On Tue, Nov 19, 2019 at 04:06:24PM +0100, Lars Pedersen wrote:
> Signed-off-by: Lars Pedersen <lapeddk@gmail.com>
> ---
> rules/python3-yoyo-migrations.in | 11 +++++
> rules/python3-yoyo-migrations.make | 76 ++++++++++++++++++++++++++++++
> 2 files changed, 87 insertions(+)
> create mode 100644 rules/python3-yoyo-migrations.in
> create mode 100644 rules/python3-yoyo-migrations.make
>
> diff --git a/rules/python3-yoyo-migrations.in b/rules/python3-yoyo-migrations.in
> new file mode 100644
> index 000000000..fa58c9952
> --- /dev/null
> +++ b/rules/python3-yoyo-migrations.in
> @@ -0,0 +1,11 @@
> +## SECTION=python3
> +
> +config PYTHON3_YOYO_MIGRATIONS
> + tristate
> + prompt "python3-yoyo-migrations"
> + select PYTHON3
> + select HOST_PYTHON3_SETUPTOOLS
> + select PYTHON3_INIHERIT
> + select PYTHON3_TEXT_UNIDECODE
> + help
> + Yoyo is a database schema migration tool using python.
> diff --git a/rules/python3-yoyo-migrations.make b/rules/python3-yoyo-migrations.make
> new file mode 100644
> index 000000000..20e2825ee
> --- /dev/null
> +++ b/rules/python3-yoyo-migrations.make
> @@ -0,0 +1,76 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2019 by Lars Pedersen <lapeddk@gmail.com>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PYTHON3_YOYO_MIGRATIONS) += python3-yoyo-migrations
> +
> +#
> +# Paths and names
> +#
> +PYTHON3_YOYO_MIGRATIONS_VERSION := 6.1.0
> +PYTHON3_YOYO_MIGRATIONS_MD5 := b91476050b685c4cfe4644217c89e8b3
> +PYTHON3_YOYO_MIGRATIONS := yoyo-migrations-$(PYTHON3_YOYO_MIGRATIONS_VERSION)
> +PYTHON3_YOYO_MIGRATIONS_SUFFIX := tar.gz
> +PYTHON3_YOYO_MIGRATIONS_URL := https://files.pythonhosted.org/packages/source/y/yoyo-migrations/$(PYTHON3_YOYO_MIGRATIONS).$(PYTHON3_YOYO_MIGRATIONS_SUFFIX)
> +PYTHON3_YOYO_MIGRATIONS_SOURCE := $(SRCDIR)/$(PYTHON3_YOYO_MIGRATIONS).$(PYTHON3_YOYO_MIGRATIONS_SUFFIX)
> +PYTHON3_YOYO_MIGRATIONS_DIR := $(BUILDDIR)/$(PYTHON3_YOYO_MIGRATIONS)
> +PYTHON3_YOYO_MIGRATIONS_LICENSE := Apache-2.0
Could you please add a PYTHON3_YOYO_MIGRATIONS_LICENSE_FILES as well, to
have a source for the Apache-2.0 license? (I guess it's something like
./LICENSE or ./COPYING). See rules/python-pyro.make for an example.
Same for the other patches you sent.
- Roland
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +PYTHON3_YOYO_MIGRATIONS_CONF_TOOL := python3
> +PYTHON3_YOYO_MIGRATIONS_MAKE_OPT := install_scripts
> +
> +# ----------------------------------------------------------------------------
> +# Install post
> +# ----------------------------------------------------------------------------
> +
> +# Fix python shebang from absolute in yoyo and yoyo-migrate install_scripts
> +$(STATEDIR)/python3-yoyo-migrations.install.post:
> + @$(call targetinfo)
> + @sed -i -e '1s,^.*$$,\#\!\/usr\/bin\/python3,g' "$(PTXDIST_PLATFORMDIR)/packages/$(PYTHON3_YOYO_MIGRATIONS)/usr/bin/yoyo"
> + @sed -i -e '1s,^.*$$,\#\!\/usr\/bin\/python3,g' "$(PTXDIST_PLATFORMDIR)/packages/$(PYTHON3_YOYO_MIGRATIONS)/usr/bin/yoyo-migrate"
> +
> + @$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/python3-yoyo-migrations.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, python3-yoyo-migrations)
> + @$(call install_fixup, python3-yoyo-migrations,PRIORITY,optional)
> + @$(call install_fixup, python3-yoyo-migrations,SECTION,base)
> + @$(call install_fixup, python3-yoyo-migrations,Lars Pedersen,"<lapeddk@gmail.com>")
> + @$(call install_fixup, python3-yoyo-migrations,DESCRIPTION,missing)
> +
> + @$(call install_glob,python3-yoyo-migrations, 0, 0, -, \
> + /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages,, *.py)
> +
> + @$(call install_copy, python3-yoyo-migrations, 0, 0, 0775, -, /usr/bin/yoyo)
> + @$(call install_copy, python3-yoyo-migrations, 0, 0, 0775, -, /usr/bin/yoyo-migrate)
> +
> + @$(call install_finish, python3-yoyo-migrations)
> +
> + @$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/python3-yoyo-migrations.clean:
> +# @$(call targetinfo)
> +# @$(call clean_pkg, PYTHON3_YOYO_MIGRATIONS)
> +
> +# vim: syntax=make
> --
> 2.23.0
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-21 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 15:06 [ptxdist] [PATCH] python3-yoyo-migrations: new package Lars Pedersen
2019-11-21 15:35 ` Roland Hieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox