mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 0/1] python3-netifaces: new package
@ 2021-10-26 15:32 Matthias Fend
  2021-10-26 15:32 ` [ptxdist] [PATCH 1/1] " Matthias Fend
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Fend @ 2021-10-26 15:32 UTC (permalink / raw)
  To: ptxdist

Hi,

netifaces provides an easy way to get the address(es) of the machine’s
network interfaces in Python.

The special thing about this package is that it has to compile a C file
when it is installed. To achieve this, the package uses some kind of
homemade build system written in Python. That sounds adventurous, but to
my surprise, it worked out of the box on both an x86_64 and an aarch64
platform.

~Matthias

Matthias Fend (1):
  python3-netifaces: new package

 rules/python3-netifaces.in   |  9 +++++++
 rules/python3-netifaces.make | 52 ++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 rules/python3-netifaces.in
 create mode 100644 rules/python3-netifaces.make

-- 
2.25.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH 1/1] python3-netifaces: new package
  2021-10-26 15:32 [ptxdist] [PATCH 0/1] python3-netifaces: new package Matthias Fend
@ 2021-10-26 15:32 ` Matthias Fend
  2021-10-29  9:19   ` Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Fend @ 2021-10-26 15:32 UTC (permalink / raw)
  To: ptxdist

netifaces provides an easy way to get the address(es) of the machine’s
network interfaces in Python.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
---
 rules/python3-netifaces.in   |  9 +++++++
 rules/python3-netifaces.make | 52 ++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 rules/python3-netifaces.in
 create mode 100644 rules/python3-netifaces.make

diff --git a/rules/python3-netifaces.in b/rules/python3-netifaces.in
new file mode 100644
index 000000000..3899ba697
--- /dev/null
+++ b/rules/python3-netifaces.in
@@ -0,0 +1,9 @@
+## SECTION=python3
+
+config PYTHON3_NETIFACES
+	tristate
+	select PYTHON3
+	prompt "python3-netifaces"
+	help
+	  netifaces provides an easy way to get the address(es) of the
+	  machine’s network interfaces in Python.
diff --git a/rules/python3-netifaces.make b/rules/python3-netifaces.make
new file mode 100644
index 000000000..9b713b73b
--- /dev/null
+++ b/rules/python3-netifaces.make
@@ -0,0 +1,52 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Matthias Fend <matthias.fend@emfend.at>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_NETIFACES) += python3-netifaces
+
+#
+# Paths and names
+#
+PYTHON3_NETIFACES_VERSION	:= 0.11.0
+PYTHON3_NETIFACES_MD5		:= 3146dcb3297dd018ae5eb9a52b440419
+PYTHON3_NETIFACES		:= netifaces-$(PYTHON3_NETIFACES_VERSION)
+PYTHON3_NETIFACES_SUFFIX	:= tar.gz
+PYTHON3_NETIFACES_URL		:= $(call ptx/mirror-pypi, netifaces, $(PYTHON3_NETIFACES).$(PYTHON3_NETIFACES_SUFFIX))
+PYTHON3_NETIFACES_SOURCE	:= $(SRCDIR)/$(PYTHON3_NETIFACES).$(PYTHON3_NETIFACES_SUFFIX)
+PYTHON3_NETIFACES_DIR		:= $(BUILDDIR)/$(PYTHON3_NETIFACES)
+PYTHON3_NETIFACES_LICENSE	:= MIT
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_NETIFACES_CONF_TOOL	:= python3
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-netifaces.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, python3-netifaces)
+	@$(call install_fixup, python3-netifaces, PRIORITY, optional)
+	@$(call install_fixup, python3-netifaces, SECTION, base)
+	@$(call install_fixup, python3-netifaces, AUTHOR, "Matthias Fend <matthias.fend@emfend.at>")
+	@$(call install_fixup, python3-netifaces, DESCRIPTION, missing)
+
+	@$(call install_glob, python3-netifaces, 0, 0, -, \
+		$(PYTHON3_SITEPACKAGES),, *.py)
+
+	@$(call install_finish, python3-netifaces)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.25.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH 1/1] python3-netifaces: new package
  2021-10-26 15:32 ` [ptxdist] [PATCH 1/1] " Matthias Fend
@ 2021-10-29  9:19   ` Roland Hieber
  2021-10-29 10:12     ` Matthias Fend
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2021-10-29  9:19 UTC (permalink / raw)
  To: Matthias Fend; +Cc: ptxdist

Hi Matthias,

On Tue, Oct 26, 2021 at 05:32:37PM +0200, Matthias Fend wrote:
> netifaces provides an easy way to get the address(es) of the machine’s
> network interfaces in Python.
> 
> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
> ---
>  rules/python3-netifaces.in   |  9 +++++++
>  rules/python3-netifaces.make | 52 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 61 insertions(+)
>  create mode 100644 rules/python3-netifaces.in
>  create mode 100644 rules/python3-netifaces.make
> 
> diff --git a/rules/python3-netifaces.in b/rules/python3-netifaces.in
> new file mode 100644
> index 000000000..3899ba697
> --- /dev/null
> +++ b/rules/python3-netifaces.in
> @@ -0,0 +1,9 @@
> +## SECTION=python3
> +
> +config PYTHON3_NETIFACES
> +	tristate
> +	select PYTHON3
> +	prompt "python3-netifaces"
> +	help
> +	  netifaces provides an easy way to get the address(es) of the
> +	  machine’s network interfaces in Python.
> diff --git a/rules/python3-netifaces.make b/rules/python3-netifaces.make
> new file mode 100644
> index 000000000..9b713b73b
> --- /dev/null
> +++ b/rules/python3-netifaces.make
> @@ -0,0 +1,52 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2021 by Matthias Fend <matthias.fend@emfend.at>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PYTHON3_NETIFACES) += python3-netifaces
> +
> +#
> +# Paths and names
> +#
> +PYTHON3_NETIFACES_VERSION	:= 0.11.0
> +PYTHON3_NETIFACES_MD5		:= 3146dcb3297dd018ae5eb9a52b440419
> +PYTHON3_NETIFACES		:= netifaces-$(PYTHON3_NETIFACES_VERSION)
> +PYTHON3_NETIFACES_SUFFIX	:= tar.gz
> +PYTHON3_NETIFACES_URL		:= $(call ptx/mirror-pypi, netifaces, $(PYTHON3_NETIFACES).$(PYTHON3_NETIFACES_SUFFIX))
> +PYTHON3_NETIFACES_SOURCE	:= $(SRCDIR)/$(PYTHON3_NETIFACES).$(PYTHON3_NETIFACES_SUFFIX)
> +PYTHON3_NETIFACES_DIR		:= $(BUILDDIR)/$(PYTHON3_NETIFACES)
> +PYTHON3_NETIFACES_LICENSE	:= MIT

Please also add at least one file to PYTHON3_NETIFACES_LICENSE_FILES,
see <https://www.ptxdist.org/doc/dev_licenses.html>

 - Roland

> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +PYTHON3_NETIFACES_CONF_TOOL	:= python3
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/python3-netifaces.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, python3-netifaces)
> +	@$(call install_fixup, python3-netifaces, PRIORITY, optional)
> +	@$(call install_fixup, python3-netifaces, SECTION, base)
> +	@$(call install_fixup, python3-netifaces, AUTHOR, "Matthias Fend <matthias.fend@emfend.at>")
> +	@$(call install_fixup, python3-netifaces, DESCRIPTION, missing)
> +
> +	@$(call install_glob, python3-netifaces, 0, 0, -, \
> +		$(PYTHON3_SITEPACKAGES),, *.py)
> +
> +	@$(call install_finish, python3-netifaces)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.25.1
> 
> 
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH 1/1] python3-netifaces: new package
  2021-10-29  9:19   ` Roland Hieber
@ 2021-10-29 10:12     ` Matthias Fend
  2021-11-01  9:58       ` Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Fend @ 2021-10-29 10:12 UTC (permalink / raw)
  To: Roland Hieber; +Cc: ptxdist

Hi Roland,

Am 29.10.2021 um 11:19 schrieb Roland Hieber:
> Hi Matthias,
> 
> On Tue, Oct 26, 2021 at 05:32:37PM +0200, Matthias Fend wrote:
>> netifaces provides an easy way to get the address(es) of the machine’s
>> network interfaces in Python.
>>
>> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
>> ---
>>   rules/python3-netifaces.in   |  9 +++++++
>>   rules/python3-netifaces.make | 52 ++++++++++++++++++++++++++++++++++++
>>   2 files changed, 61 insertions(+)
>>   create mode 100644 rules/python3-netifaces.in
>>   create mode 100644 rules/python3-netifaces.make
>>
>> diff --git a/rules/python3-netifaces.in b/rules/python3-netifaces.in
>> new file mode 100644
>> index 000000000..3899ba697
>> --- /dev/null
>> +++ b/rules/python3-netifaces.in
>> @@ -0,0 +1,9 @@
>> +## SECTION=python3
>> +
>> +config PYTHON3_NETIFACES
>> +	tristate
>> +	select PYTHON3
>> +	prompt "python3-netifaces"
>> +	help
>> +	  netifaces provides an easy way to get the address(es) of the
>> +	  machine’s network interfaces in Python.
>> diff --git a/rules/python3-netifaces.make b/rules/python3-netifaces.make
>> new file mode 100644
>> index 000000000..9b713b73b
>> --- /dev/null
>> +++ b/rules/python3-netifaces.make
>> @@ -0,0 +1,52 @@
>> +# -*-makefile-*-
>> +#
>> +# Copyright (C) 2021 by Matthias Fend <matthias.fend@emfend.at>
>> +#
>> +# For further information about the PTXdist project and license conditions
>> +# see the README file.
>> +#
>> +
>> +#
>> +# We provide this package
>> +#
>> +PACKAGES-$(PTXCONF_PYTHON3_NETIFACES) += python3-netifaces
>> +
>> +#
>> +# Paths and names
>> +#
>> +PYTHON3_NETIFACES_VERSION	:= 0.11.0
>> +PYTHON3_NETIFACES_MD5		:= 3146dcb3297dd018ae5eb9a52b440419
>> +PYTHON3_NETIFACES		:= netifaces-$(PYTHON3_NETIFACES_VERSION)
>> +PYTHON3_NETIFACES_SUFFIX	:= tar.gz
>> +PYTHON3_NETIFACES_URL		:= $(call ptx/mirror-pypi, netifaces, $(PYTHON3_NETIFACES).$(PYTHON3_NETIFACES_SUFFIX))
>> +PYTHON3_NETIFACES_SOURCE	:= $(SRCDIR)/$(PYTHON3_NETIFACES).$(PYTHON3_NETIFACES_SUFFIX)
>> +PYTHON3_NETIFACES_DIR		:= $(BUILDDIR)/$(PYTHON3_NETIFACES)
>> +PYTHON3_NETIFACES_LICENSE	:= MIT
> 
> Please also add at least one file to PYTHON3_NETIFACES_LICENSE_FILES,
> see <https://www.ptxdist.org/doc/dev_licenses.html>

I thought this could be omitted if ptxdist can find the license 
automatically.
In any case, I will send a version with a fixed license file.

Thanks
  ~Matthias

> 
>   - Roland
> 
>> +
>> +# ----------------------------------------------------------------------------
>> +# Prepare
>> +# ----------------------------------------------------------------------------
>> +
>> +PYTHON3_NETIFACES_CONF_TOOL	:= python3
>> +
>> +# ----------------------------------------------------------------------------
>> +# Target-Install
>> +# ----------------------------------------------------------------------------
>> +
>> +$(STATEDIR)/python3-netifaces.targetinstall:
>> +	@$(call targetinfo)
>> +
>> +	@$(call install_init, python3-netifaces)
>> +	@$(call install_fixup, python3-netifaces, PRIORITY, optional)
>> +	@$(call install_fixup, python3-netifaces, SECTION, base)
>> +	@$(call install_fixup, python3-netifaces, AUTHOR, "Matthias Fend <matthias.fend@emfend.at>")
>> +	@$(call install_fixup, python3-netifaces, DESCRIPTION, missing)
>> +
>> +	@$(call install_glob, python3-netifaces, 0, 0, -, \
>> +		$(PYTHON3_SITEPACKAGES),, *.py)
>> +
>> +	@$(call install_finish, python3-netifaces)
>> +
>> +	@$(call touch)
>> +
>> +# vim: syntax=make
>> -- 
>> 2.25.1
>>
>>
>> _______________________________________________
>> ptxdist mailing list
>> ptxdist@pengutronix.de
>> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH 1/1] python3-netifaces: new package
  2021-10-29 10:12     ` Matthias Fend
@ 2021-11-01  9:58       ` Roland Hieber
  0 siblings, 0 replies; 5+ messages in thread
From: Roland Hieber @ 2021-11-01  9:58 UTC (permalink / raw)
  To: ptxdist

On Fri, Oct 29, 2021 at 12:12:19PM +0200, Matthias Fend wrote:
> Hi Roland,
> 
> Am 29.10.2021 um 11:19 schrieb Roland Hieber:
> > Hi Matthias,
> > 
> > On Tue, Oct 26, 2021 at 05:32:37PM +0200, Matthias Fend wrote:
> > > netifaces provides an easy way to get the address(es) of the machine’s
> > > network interfaces in Python.
> > > 
> > > Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
> > > ---
> > >   rules/python3-netifaces.in   |  9 +++++++
> > >   rules/python3-netifaces.make | 52 ++++++++++++++++++++++++++++++++++++
> > >   2 files changed, 61 insertions(+)
> > >   create mode 100644 rules/python3-netifaces.in
> > >   create mode 100644 rules/python3-netifaces.make
> > > 
> > > diff --git a/rules/python3-netifaces.in b/rules/python3-netifaces.in
> > > new file mode 100644
> > > index 000000000..3899ba697
> > > --- /dev/null
> > > +++ b/rules/python3-netifaces.in
> > > @@ -0,0 +1,9 @@
> > > +## SECTION=python3
> > > +
> > > +config PYTHON3_NETIFACES
> > > +	tristate
> > > +	select PYTHON3
> > > +	prompt "python3-netifaces"
> > > +	help
> > > +	  netifaces provides an easy way to get the address(es) of the
> > > +	  machine’s network interfaces in Python.
> > > diff --git a/rules/python3-netifaces.make b/rules/python3-netifaces.make
> > > new file mode 100644
> > > index 000000000..9b713b73b
> > > --- /dev/null
> > > +++ b/rules/python3-netifaces.make
> > > @@ -0,0 +1,52 @@
> > > +# -*-makefile-*-
> > > +#
> > > +# Copyright (C) 2021 by Matthias Fend <matthias.fend@emfend.at>
> > > +#
> > > +# For further information about the PTXdist project and license conditions
> > > +# see the README file.
> > > +#
> > > +
> > > +#
> > > +# We provide this package
> > > +#
> > > +PACKAGES-$(PTXCONF_PYTHON3_NETIFACES) += python3-netifaces
> > > +
> > > +#
> > > +# Paths and names
> > > +#
> > > +PYTHON3_NETIFACES_VERSION	:= 0.11.0
> > > +PYTHON3_NETIFACES_MD5		:= 3146dcb3297dd018ae5eb9a52b440419
> > > +PYTHON3_NETIFACES		:= netifaces-$(PYTHON3_NETIFACES_VERSION)
> > > +PYTHON3_NETIFACES_SUFFIX	:= tar.gz
> > > +PYTHON3_NETIFACES_URL		:= $(call ptx/mirror-pypi, netifaces, $(PYTHON3_NETIFACES).$(PYTHON3_NETIFACES_SUFFIX))
> > > +PYTHON3_NETIFACES_SOURCE	:= $(SRCDIR)/$(PYTHON3_NETIFACES).$(PYTHON3_NETIFACES_SUFFIX)
> > > +PYTHON3_NETIFACES_DIR		:= $(BUILDDIR)/$(PYTHON3_NETIFACES)
> > > +PYTHON3_NETIFACES_LICENSE	:= MIT
> > 
> > Please also add at least one file to PYTHON3_NETIFACES_LICENSE_FILES,
> > see <https://www.ptxdist.org/doc/dev_licenses.html>
> 
> I thought this could be omitted if ptxdist can find the license
> automatically.

Yes, but the md5 hash cannot be detected automatically, so we don't
notice when the same file changes between releases, in which case we
would probably need to update the _LICENSE field accordingly.

> In any case, I will send a version with a fixed license file.

Thanks!

 - Roland

> 
> Thanks
>  ~Matthias
> 
> > 
> >   - Roland
> > 
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Prepare
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +PYTHON3_NETIFACES_CONF_TOOL	:= python3
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Target-Install
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/python3-netifaces.targetinstall:
> > > +	@$(call targetinfo)
> > > +
> > > +	@$(call install_init, python3-netifaces)
> > > +	@$(call install_fixup, python3-netifaces, PRIORITY, optional)
> > > +	@$(call install_fixup, python3-netifaces, SECTION, base)
> > > +	@$(call install_fixup, python3-netifaces, AUTHOR, "Matthias Fend <matthias.fend@emfend.at>")
> > > +	@$(call install_fixup, python3-netifaces, DESCRIPTION, missing)
> > > +
> > > +	@$(call install_glob, python3-netifaces, 0, 0, -, \
> > > +		$(PYTHON3_SITEPACKAGES),, *.py)
> > > +
> > > +	@$(call install_finish, python3-netifaces)
> > > +
> > > +	@$(call touch)
> > > +
> > > +# vim: syntax=make
> > > -- 
> > > 2.25.1
> > > 
> > > 
> > > _______________________________________________
> > > ptxdist mailing list
> > > ptxdist@pengutronix.de
> > > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> > 
> 
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-01  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 15:32 [ptxdist] [PATCH 0/1] python3-netifaces: new package Matthias Fend
2021-10-26 15:32 ` [ptxdist] [PATCH 1/1] " Matthias Fend
2021-10-29  9:19   ` Roland Hieber
2021-10-29 10:12     ` Matthias Fend
2021-11-01  9:58       ` Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox