Re: [ptxdist] [PATCH] python3-numpy: New package
El mar., 19 nov. 2019 a las 10:23, Michael Olbrich () escribió: > > Hi, > > On Tue, Nov 19, 2019 at 10:10:09AM +0100, Guillermo Rodriguez Garcia wrote: > > El vie., 15 nov. 2019 a las 21:11, Guillermo Rodriguez Garcia > > () escribió: > > > El viernes, 15 de noviembre de 2019, Michael Olbrich > > > escribió: > > >> On Fri, Nov 15, 2019 at 09:51:25AM +0100, Guillermo Rodríguez wrote: > > >> > NumPy is the fundamental package for scientific computing with Python. > > >> > > > >> > Signed-off-by: Guillermo Rodriguez > > >> > --- > > >> > v2: Switch to PyPi URL; this removes the dependency on Cython. > > >> > v3: Update LICENSE, add LICENSE_FILES > > >> > v4: Update LICENSE and LICENSE_FILES with additional licenses > > >> > v5: Removed "unknown" from LICENSE > > >> > v6: Updated to 1.17.4, added patch to fix cross compilation > > >> > > > >> > .../numpy-1.17.4/0001-remove-sse2-flag.patch | 21 +++ > > >> > patches/numpy-1.17.4/series | 1 + > > >> > rules/python3-numpy.in| 10 > > >> > rules/python3-numpy.make | 57 +++ > > >> > 4 files changed, 89 insertions(+) > > >> > create mode 100644 patches/numpy-1.17.4/0001-remove-sse2-flag.patch > > >> > create mode 100644 patches/numpy-1.17.4/series > > >> > create mode 100644 rules/python3-numpy.in > > >> > create mode 100644 rules/python3-numpy.make > > >> > > > >> > diff --git a/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > > >> > b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > > >> > new file mode 100644 > > >> > index 0..e1cb0d878 > > >> > --- /dev/null > > >> > +++ b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > > >> > @@ -0,0 +1,21 @@ > > >> > +Fix cross-compilation for non-Intel targets. > > >> > +See: https://github.com/numpy/numpy/issues/14861 > > >> > + > > >> > +--- > > >> > > >> Please create a proper patch header. > > >> > > >> > > > > > > Can you please let me know what is wrong specifically? The patch was > > > generated by quilt and I just added the comment in the first two lines. > > > > > > I'd prefer to fix whatever is wrong in the patch header rather than > > > regenerate the patch using a different method. > > > > Waiting for feedback on this one in order to generate a new version > > that would fix the patch header and remove the explicit > > HOST_PYTHON3_SETUPTOOLS dependency. > > In general, I'd like to see the From:, Date:, Subject: headers created by > git. In this specific case, now that it is fixed upstream, I prefer the > exact patch from upstream The exact patch from upstream does not apply cleanly, that's why I regenerated it. > (including these headers) and with an added > comment, that it's ab backport from upstream. That helps when the packages > is updated to a new version. OK. Guillermo > > Michael > > -- > 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- | > > ___ > ptxdist mailing list > ptxdist@pengutronix.de -- Guillermo Rodriguez Garcia guille.rodrig...@gmail.com ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH] python3-numpy: New package
Hi, On Tue, Nov 19, 2019 at 10:10:09AM +0100, Guillermo Rodriguez Garcia wrote: > El vie., 15 nov. 2019 a las 21:11, Guillermo Rodriguez Garcia > () escribió: > > El viernes, 15 de noviembre de 2019, Michael Olbrich > > escribió: > >> On Fri, Nov 15, 2019 at 09:51:25AM +0100, Guillermo Rodríguez wrote: > >> > NumPy is the fundamental package for scientific computing with Python. > >> > > >> > Signed-off-by: Guillermo Rodriguez > >> > --- > >> > v2: Switch to PyPi URL; this removes the dependency on Cython. > >> > v3: Update LICENSE, add LICENSE_FILES > >> > v4: Update LICENSE and LICENSE_FILES with additional licenses > >> > v5: Removed "unknown" from LICENSE > >> > v6: Updated to 1.17.4, added patch to fix cross compilation > >> > > >> > .../numpy-1.17.4/0001-remove-sse2-flag.patch | 21 +++ > >> > patches/numpy-1.17.4/series | 1 + > >> > rules/python3-numpy.in| 10 > >> > rules/python3-numpy.make | 57 +++ > >> > 4 files changed, 89 insertions(+) > >> > create mode 100644 patches/numpy-1.17.4/0001-remove-sse2-flag.patch > >> > create mode 100644 patches/numpy-1.17.4/series > >> > create mode 100644 rules/python3-numpy.in > >> > create mode 100644 rules/python3-numpy.make > >> > > >> > diff --git a/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > >> > b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > >> > new file mode 100644 > >> > index 0..e1cb0d878 > >> > --- /dev/null > >> > +++ b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > >> > @@ -0,0 +1,21 @@ > >> > +Fix cross-compilation for non-Intel targets. > >> > +See: https://github.com/numpy/numpy/issues/14861 > >> > + > >> > +--- > >> > >> Please create a proper patch header. > >> > >> > > > > Can you please let me know what is wrong specifically? The patch was > > generated by quilt and I just added the comment in the first two lines. > > > > I'd prefer to fix whatever is wrong in the patch header rather than > > regenerate the patch using a different method. > > Waiting for feedback on this one in order to generate a new version > that would fix the patch header and remove the explicit > HOST_PYTHON3_SETUPTOOLS dependency. In general, I'd like to see the From:, Date:, Subject: headers created by git. In this specific case, now that it is fixed upstream, I prefer the exact patch from upstream (including these headers) and with an added comment, that it's ab backport from upstream. That helps when the packages is updated to a new version. Michael -- 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- | ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH] python3-numpy: New package
Hi Michael, El vie., 15 nov. 2019 a las 21:11, Guillermo Rodriguez Garcia () escribió: > > Hi Michael, > > El viernes, 15 de noviembre de 2019, Michael Olbrich > escribió: >> >> On Fri, Nov 15, 2019 at 09:51:25AM +0100, Guillermo Rodríguez wrote: >> > NumPy is the fundamental package for scientific computing with Python. >> > >> > Signed-off-by: Guillermo Rodriguez >> > --- >> > v2: Switch to PyPi URL; this removes the dependency on Cython. >> > v3: Update LICENSE, add LICENSE_FILES >> > v4: Update LICENSE and LICENSE_FILES with additional licenses >> > v5: Removed "unknown" from LICENSE >> > v6: Updated to 1.17.4, added patch to fix cross compilation >> > >> > .../numpy-1.17.4/0001-remove-sse2-flag.patch | 21 +++ >> > patches/numpy-1.17.4/series | 1 + >> > rules/python3-numpy.in| 10 >> > rules/python3-numpy.make | 57 +++ >> > 4 files changed, 89 insertions(+) >> > create mode 100644 patches/numpy-1.17.4/0001-remove-sse2-flag.patch >> > create mode 100644 patches/numpy-1.17.4/series >> > create mode 100644 rules/python3-numpy.in >> > create mode 100644 rules/python3-numpy.make >> > >> > diff --git a/patches/numpy-1.17.4/0001-remove-sse2-flag.patch >> > b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch >> > new file mode 100644 >> > index 0..e1cb0d878 >> > --- /dev/null >> > +++ b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch >> > @@ -0,0 +1,21 @@ >> > +Fix cross-compilation for non-Intel targets. >> > +See: https://github.com/numpy/numpy/issues/14861 >> > + >> > +--- >> >> Please create a proper patch header. >> >> > > Can you please let me know what is wrong specifically? The patch was > generated by quilt and I just added the comment in the first two lines. > > I'd prefer to fix whatever is wrong in the patch header rather than > regenerate the patch using a different method. Waiting for feedback on this one in order to generate a new version that would fix the patch header and remove the explicit HOST_PYTHON3_SETUPTOOLS dependency. BR, Guillermo ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH] python3-numpy: New package
Hi Michael, El viernes, 15 de noviembre de 2019, Michael Olbrich < m.olbr...@pengutronix.de> escribió: > On Fri, Nov 15, 2019 at 09:51:25AM +0100, Guillermo Rodríguez wrote: > > NumPy is the fundamental package for scientific computing with Python. > > > > Signed-off-by: Guillermo Rodriguez > > --- > > v2: Switch to PyPi URL; this removes the dependency on Cython. > > v3: Update LICENSE, add LICENSE_FILES > > v4: Update LICENSE and LICENSE_FILES with additional licenses > > v5: Removed "unknown" from LICENSE > > v6: Updated to 1.17.4, added patch to fix cross compilation > > > > .../numpy-1.17.4/0001-remove-sse2-flag.patch | 21 +++ > > patches/numpy-1.17.4/series | 1 + > > rules/python3-numpy.in| 10 > > rules/python3-numpy.make | 57 +++ > > 4 files changed, 89 insertions(+) > > create mode 100644 patches/numpy-1.17.4/0001-remove-sse2-flag.patch > > create mode 100644 patches/numpy-1.17.4/series > > create mode 100644 rules/python3-numpy.in > > create mode 100644 rules/python3-numpy.make > > > > diff --git a/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > > new file mode 100644 > > index 0..e1cb0d878 > > --- /dev/null > > +++ b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > > @@ -0,0 +1,21 @@ > > +Fix cross-compilation for non-Intel targets. > > +See: https://github.com/numpy/numpy/issues/14861 > > + > > +--- > > Please create a proper patch header. > Can you please let me know what is wrong specifically? The patch was generated by quilt and I just added the comment in the first two lines. I'd prefer to fix whatever is wrong in the patch header rather than regenerate the patch using a different method. BR, Guillermo > > PTXdist can help with this: > > https://www.ptxdist.org/doc/dev_manual.html#using-git > > > + > > +Index: numpy-1.17.4/numpy/random/setup.py > > +=== > > +--- numpy-1.17.4.orig/numpy/random/setup.py 2019-11-08 > 08:41:56.0 +0100 > > numpy-1.17.4/numpy/random/setup.py 2019-11-15 > 07:57:15.996694807 +0100 > > +@@ -49,11 +49,6 @@ > > + elif not is_msvc: > > + # Some bit generators require c99 > > + EXTRA_COMPILE_ARGS += ['-std=c99'] > > +-INTEL_LIKE = any(arch in platform.machine() > > +- for arch in ('x86', 'i686', 'i386', 'amd64')) > > +-if INTEL_LIKE: > > +-# Assumes GCC or GCC-like compiler > > +-EXTRA_COMPILE_ARGS += ['-msse2'] > > + > > + # Use legacy integer variable sizes > > + LEGACY_DEFS = [('NP_RANDOM_LEGACY', '1')] > > diff --git a/patches/numpy-1.17.4/series b/patches/numpy-1.17.4/series > > new file mode 100644 > > index 0..64785c945 > > --- /dev/null > > +++ b/patches/numpy-1.17.4/series > > @@ -0,0 +1 @@ > > +0001-remove-sse2-flag.patch > > diff --git a/rules/python3-numpy.in b/rules/python3-numpy.in > > new file mode 100644 > > index 0..1440e409a > > --- /dev/null > > +++ b/rules/python3-numpy.in > > @@ -0,0 +1,10 @@ > > +## SECTION=python3 > > + > > +config PYTHON3_NUMPY > > + tristate > > + select PYTHON3 > > + select HOST_PYTHON3_SETUPTOOLS > > Just PYTHON3 is sufficient. HOST_PYTHON3_SETUPTOOLS is selected there. > > Michael > > > + prompt "python3-numpy" > > + help > > + NumPy is the fundamental package for scientific computing with > > + Python. > > diff --git a/rules/python3-numpy.make b/rules/python3-numpy.make > > new file mode 100644 > > index 0..6b161856b > > --- /dev/null > > +++ b/rules/python3-numpy.make > > @@ -0,0 +1,57 @@ > > +# -*-makefile-*- > > +# > > +# Copyright (C) 2019 by Guillermo Rodriguez > > > +# > > +# For further information about the PTXdist project and license > conditions > > +# see the README file. > > +# > > + > > +# > > +# We provide this package > > +# > > +PACKAGES-$(PTXCONF_PYTHON3_NUMPY) += python3-numpy > > + > > +# > > +# Paths and names > > +# > > +PYTHON3_NUMPY_VERSION:= 1.17.4 > > +PYTHON3_NUMPY_MD5:= d7d3563cca0b99ba68a3f064a9e46ebe > > +PYTHON3_NUMPY:= numpy-$(PYTHON3_NUMPY_VERSION) > > +PYTHON3_NUMPY_SUFFIX := zip > > +PYTHON3_NUMPY_URL:= https://pypi.python.org/ > packages/source/n/numpy/$(PYTHON3_NUMPY).$(PYTHON3_NUMPY_SUFFIX) > > +PYTHON3_NUMPY_SOURCE := $(SRCDIR)/$(PYTHON3_NUMPY).$( > PYTHON3_NUMPY_SUFFIX) > > +PYTHON3_NUMPY_DIR:= $(BUILDDIR)/$(PYTHON3_NUMPY) > > +PYTHON3_NUMPY_LICENSE:= BSD AND BSD-3-Clause AND MIT > > +PYTHON3_NUMPY_LICENSE_FILES := \ > > + file://LICENSE.txt;md5=1a32aba007a415aa8a1c708a0e2b86a1 \ > > + file://tools/npy_tempita/license.txt;md5= > c66b85ddcd09296abff87601467724fd \ > > + file://numpy/core/src/multiarray/dragon4.c; > startline=2;endline=20;md5=7f70862b43e17922c5adf18ec84fb720 > > + > > + > > +#
Re: [ptxdist] [PATCH] python3-numpy: New package
Hi Roland, El mar., 12 nov. 2019 a las 10:51, Roland Hieber () escribió: [...] > > +PYTHON3_NUMPY_VERSION:= 1.16.1 > > +PYTHON3_NUMPY_MD5:= bddcc682669b4be438db5eab61aa39b5 > > +PYTHON3_NUMPY:= Numpy-$(PYTHON3_NUMPY_VERSION) > > +PYTHON3_NUMPY_SUFFIX := tar.gz > > +PYTHON3_NUMPY_URL:= > https://github.com/numpy/numpy/archive/v$(PYTHON3_NUMPY_VERSION).$(PYTHON3_NUMPY_SUFFIX) > > +PYTHON3_NUMPY_SOURCE := > $(SRCDIR)/$(PYTHON3_NUMPY).$(PYTHON3_NUMPY_SUFFIX) > > +PYTHON3_NUMPY_DIR:= $(BUILDDIR)/$(PYTHON3_NUMPY) > > +PYTHON3_NUMPY_LICENSE:= BSD > > While you're at it, please add at least one file and MD5 sum to the > PYTHON3_NUMPY_LICENSE_FILES variable. And according to LICENSE.txt, > there are also files under different licenses in the source tree, these > licenses should be added here as well. > Not sure how this works, let me give it a try. BR, Guillermo Rodriguez Garcia guille.rodrig...@gmail.com ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH] python3-numpy: New package
On Mon, Nov 11, 2019 at 04:13:18PM +0100, Guillermo Rodríguez wrote: > NumPy is the fundamental package for scientific computing with Python. > > Signed-off-by: Guillermo Rodriguez > --- > rules/python3-numpy.in | 11 + > rules/python3-numpy.make | 52 > 2 files changed, 63 insertions(+) > create mode 100644 rules/python3-numpy.in > create mode 100644 rules/python3-numpy.make > > diff --git a/rules/python3-numpy.in b/rules/python3-numpy.in > new file mode 100644 > index 0..2edbab146 > --- /dev/null > +++ b/rules/python3-numpy.in > @@ -0,0 +1,11 @@ > +## SECTION=python3 > + > +config PYTHON3_NUMPY > + tristate > + select PYTHON3 > + select HOST_PYTHON3_CYTHON > + select HOST_PYTHON3_SETUPTOOLS > + prompt "python3-numpy" > + help > + NumPy is the fundamental package for scientific computing with > + Python. > diff --git a/rules/python3-numpy.make b/rules/python3-numpy.make > new file mode 100644 > index 0..4c1ee70c3 > --- /dev/null > +++ b/rules/python3-numpy.make > @@ -0,0 +1,52 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2019 by Guillermo Rodriguez > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_PYTHON3_NUMPY) += python3-numpy > + > +# > +# Paths and names > +# > +PYTHON3_NUMPY_VERSION:= 1.16.1 > +PYTHON3_NUMPY_MD5:= bddcc682669b4be438db5eab61aa39b5 > +PYTHON3_NUMPY:= Numpy-$(PYTHON3_NUMPY_VERSION) > +PYTHON3_NUMPY_SUFFIX := tar.gz > +PYTHON3_NUMPY_URL:= > https://github.com/numpy/numpy/archive/v$(PYTHON3_NUMPY_VERSION).$(PYTHON3_NUMPY_SUFFIX) > +PYTHON3_NUMPY_SOURCE := $(SRCDIR)/$(PYTHON3_NUMPY).$(PYTHON3_NUMPY_SUFFIX) > +PYTHON3_NUMPY_DIR:= $(BUILDDIR)/$(PYTHON3_NUMPY) > +PYTHON3_NUMPY_LICENSE:= BSD While you're at it, please add at least one file and MD5 sum to the PYTHON3_NUMPY_LICENSE_FILES variable. And according to LICENSE.txt, there are also files under different licenses in the source tree, these licenses should be added here as well. - Roland > + > +# > > +# Prepare > +# > > + > +PYTHON3_NUMPY_CONF_TOOL := python3 > + > +# > > +# Target-Install > +# > > + > +$(STATEDIR)/python3-numpy.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, python3-numpy) > + @$(call install_fixup, python3-numpy, PRIORITY, optional) > + @$(call install_fixup, python3-numpy, SECTION, base) > + @$(call install_fixup, python3-numpy, AUTHOR, "Guillermo Rodriguez > ") > + @$(call install_fixup, python3-numpy, DESCRIPTION, missing) > + > + @$(call install_glob, python3-numpy, 0, 0, -, \ > + /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/numpy,, > *.py) > + > + @$(call install_finish, python3-numpy) > + > + @$(call touch) > + > +# vim: syntax=make > -- > 2.21.0 > > > ___ > ptxdist mailing list > ptxdist@pengutronix.de > -- Roland Hieber, Pengutronix e.K. | r.hie...@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- | ___ ptxdist mailing list ptxdist@pengutronix.de
[ptxdist] [PATCH] python3-numpy: New package
NumPy is the fundamental package for scientific computing with Python. Signed-off-by: Guillermo Rodriguez --- rules/python3-numpy.in | 11 + rules/python3-numpy.make | 52 2 files changed, 63 insertions(+) create mode 100644 rules/python3-numpy.in create mode 100644 rules/python3-numpy.make diff --git a/rules/python3-numpy.in b/rules/python3-numpy.in new file mode 100644 index 0..2edbab146 --- /dev/null +++ b/rules/python3-numpy.in @@ -0,0 +1,11 @@ +## SECTION=python3 + +config PYTHON3_NUMPY + tristate + select PYTHON3 + select HOST_PYTHON3_CYTHON + select HOST_PYTHON3_SETUPTOOLS + prompt "python3-numpy" + help + NumPy is the fundamental package for scientific computing with + Python. diff --git a/rules/python3-numpy.make b/rules/python3-numpy.make new file mode 100644 index 0..4c1ee70c3 --- /dev/null +++ b/rules/python3-numpy.make @@ -0,0 +1,52 @@ +# -*-makefile-*- +# +# Copyright (C) 2019 by Guillermo Rodriguez +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_PYTHON3_NUMPY) += python3-numpy + +# +# Paths and names +# +PYTHON3_NUMPY_VERSION := 1.16.1 +PYTHON3_NUMPY_MD5 := bddcc682669b4be438db5eab61aa39b5 +PYTHON3_NUMPY := Numpy-$(PYTHON3_NUMPY_VERSION) +PYTHON3_NUMPY_SUFFIX := tar.gz +PYTHON3_NUMPY_URL := https://github.com/numpy/numpy/archive/v$(PYTHON3_NUMPY_VERSION).$(PYTHON3_NUMPY_SUFFIX) +PYTHON3_NUMPY_SOURCE := $(SRCDIR)/$(PYTHON3_NUMPY).$(PYTHON3_NUMPY_SUFFIX) +PYTHON3_NUMPY_DIR := $(BUILDDIR)/$(PYTHON3_NUMPY) +PYTHON3_NUMPY_LICENSE := BSD + +# +# Prepare +# + +PYTHON3_NUMPY_CONF_TOOL:= python3 + +# +# Target-Install +# + +$(STATEDIR)/python3-numpy.targetinstall: + @$(call targetinfo) + + @$(call install_init, python3-numpy) + @$(call install_fixup, python3-numpy, PRIORITY, optional) + @$(call install_fixup, python3-numpy, SECTION, base) + @$(call install_fixup, python3-numpy, AUTHOR, "Guillermo Rodriguez ") + @$(call install_fixup, python3-numpy, DESCRIPTION, missing) + + @$(call install_glob, python3-numpy, 0, 0, -, \ + /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/numpy,, *.py) + + @$(call install_finish, python3-numpy) + + @$(call touch) + +# vim: syntax=make -- 2.21.0 ___ ptxdist mailing list ptxdist@pengutronix.de