From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iVhwK-0000Dl-T4 for ptxdist@pengutronix.de; Fri, 15 Nov 2019 21:11:34 +0100 Received: by mail-ed1-x543.google.com with SMTP id w6so8392021edx.10 for ; Fri, 15 Nov 2019 12:11:32 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20191115141910.GE1287@pengutronix.de> References: <20191115085125.2223-1-guille.rodriguez@gmail.com> <20191115141910.GE1287@pengutronix.de> From: Guillermo Rodriguez Garcia Date: Fri, 15 Nov 2019 21:11:31 +0100 Message-ID: Subject: Re: [ptxdist] [PATCH] python3-numpy: New package List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============0735159496==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: "ptxdist@pengutronix.de" , =?UTF-8?Q?Guillermo_Rodr=C3=ADguez?= --===============0735159496== Content-Type: multipart/alternative; boundary="00000000000035bee70597683474" --00000000000035bee70597683474 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Michael, El viernes, 15 de noviembre de 2019, Michael Olbrich < m.olbrich@pengutronix.de> escribi=C3=B3: > On Fri, Nov 15, 2019 at 09:51:25AM +0100, Guillermo Rodr=C3=ADguez 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 000000000..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 > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > +--- numpy-1.17.4.orig/numpy/random/setup.py 2019-11-08 > 08:41:56.000000000 +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 +=3D ['-std=3Dc99'] > > +- INTEL_LIKE =3D any(arch in platform.machine() > > +- for arch in ('x86', 'i686', 'i386', 'amd64')= ) > > +- if INTEL_LIKE: > > +- # Assumes GCC or GCC-like compiler > > +- EXTRA_COMPILE_ARGS +=3D ['-msse2'] > > + > > + # Use legacy integer variable sizes > > + LEGACY_DEFS =3D [('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 000000000..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 000000000..1440e409a > > --- /dev/null > > +++ b/rules/python3-numpy.in > > @@ -0,0 +1,10 @@ > > +## SECTION=3Dpython3 > > + > > +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 000000000..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) +=3D python3-numpy > > + > > +# > > +# Paths and names > > +# > > +PYTHON3_NUMPY_VERSION :=3D 1.17.4 > > +PYTHON3_NUMPY_MD5 :=3D d7d3563cca0b99ba68a3f064a9e46ebe > > +PYTHON3_NUMPY :=3D numpy-$(PYTHON3_NUMPY_VERSION) > > +PYTHON3_NUMPY_SUFFIX :=3D zip > > +PYTHON3_NUMPY_URL :=3D https://pypi.python.org/ > packages/source/n/numpy/$(PYTHON3_NUMPY).$(PYTHON3_NUMPY_SUFFIX) > > +PYTHON3_NUMPY_SOURCE :=3D $(SRCDIR)/$(PYTHON3_NUMPY).$( > PYTHON3_NUMPY_SUFFIX) > > +PYTHON3_NUMPY_DIR :=3D $(BUILDDIR)/$(PYTHON3_NUMPY) > > +PYTHON3_NUMPY_LICENSE :=3D BSD AND BSD-3-Clause AND MIT > > +PYTHON3_NUMPY_LICENSE_FILES :=3D \ > > + file://LICENSE.txt;md5=3D1a32aba007a415aa8a1c708a0e2b86a1 \ > > + file://tools/npy_tempita/license.txt;md5=3D > c66b85ddcd09296abff87601467724fd \ > > + file://numpy/core/src/multiarray/dragon4.c; > startline=3D2;endline=3D20;md5=3D7f70862b43e17922c5adf18ec84fb720 > > + > > + > > +# ------------------------------------------------------------ > ---------------- > > +# Prepare > > +# ------------------------------------------------------------ > ---------------- > > + > > +PYTHON3_NUMPY_CONF_TOOL :=3D 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 Rodrigue= z > ") > > + @$(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=3Dmake > > -- > > 2.21.0 > > > > > > _______________________________________________ > > ptxdist mailing list > > ptxdist@pengutronix.de > > > > -- > 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-5555 = | > --=20 Guillermo Rodriguez Garcia guille.rodriguez@gmail.com --00000000000035bee70597683474 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Michael,

El viernes, 15 de noviembre de 2019, Michael Olbrich <= ;m.olbrich@pengutronix.de&g= t; escribi=C3=B3:
On Fri, Nov 15, 2019 at= 09:51:25AM +0100, Guillermo Rodr=C3=ADguez wrote:
> NumPy is the fundamental package for scientific computing with Python.=
>
> Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com>
> ---
> 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
>
>=C2=A0 .../numpy-1.17.4/0001-remove-sse2-flag.patch=C2=A0 | 21 +++= ++++
>=C2=A0 patches/numpy-1.17.4/series=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 1 +
>=C2=A0 rules/pyth= on3-numpy.in=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 | 10 ++++
>=C2=A0 rules/python3-numpy.make=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 57 +++++++++++++++++++
>=C2=A0 4 files changed, 89 insertions(+)
>=C2=A0 create mode 100644 patches/numpy-1.17.4/0001-remove-sse2-fl= ag.patch
>=C2=A0 create mode 100644 patches/numpy-1.17.4/series
>=C2=A0 create mode 100644 rules/python3-numpy.in
>=C2=A0 create mode 100644 rules/python3-numpy.make
>
> diff --git a/patches/numpy-1.17.4/0001-remove-sse2-flag.patch b/p= atches/numpy-1.17.4/0001-remove-sse2-flag.patch
> new file mode 100644
> index 000000000..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.=C2=A0


Can you please let me know = what is wrong specifically? The patch was generated by quilt and I just add= ed the comment in the first two lines.=C2=A0
=C2=A0
I&#= 39;d prefer to fix whatever is wrong in the patch header rather than regene= rate the patch using a different method.=C2=A0

BR,=

Guillermo
=C2=A0

PTXdist can h= elp with this:

https://www.ptxdist.org/doc/dev_manual.html#using-git

> +
> +Index: numpy-1.17.4/numpy/random/setup.py
> +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> +--- numpy-1.17.4.orig/numpy/random/setup.py=C2=A0 2019-11-08 08:= 41:56.000000000 +0100
> ++++ numpy-1.17.4/numpy/random/setup.py=C2=A0 =C2=A0 =C2=A0 =C2= =A02019-11-15 07:57:15.996694807 +0100
> +@@ -49,11 +49,6 @@
> +=C2=A0 =C2=A0 =C2=A0elif not is_msvc:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Some bit generators require c99 > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EXTRA_COMPILE_ARGS +=3D ['-std= =3Dc99']
> +-=C2=A0 =C2=A0 =C2=A0 =C2=A0 INTEL_LIKE =3D any(arch in platform.mach= ine()
> +-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0for arch in ('x86', 'i686', 'i3= 86', 'amd64'))
> +-=C2=A0 =C2=A0 =C2=A0 =C2=A0 if INTEL_LIKE:
> +-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Assumes GCC or GCC-like = compiler
> +-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 EXTRA_COMPILE_ARGS +=3D [&= #39;-msse2']
> +
> +=C2=A0 =C2=A0 =C2=A0# Use legacy integer variable sizes
> +=C2=A0 =C2=A0 =C2=A0LEGACY_DEFS =3D [('NP_RANDOM_LEGACY', = 9;1')]
> diff --git a/patches/numpy-1.17.4/series b/patches/numpy-1.17.4/series=
> new file mode 100644
> index 000000000..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 000000000..1440e409a
> --- /dev/null
> +++ b/rules/pyth= on3-numpy.in
> @@ -0,0 +1,10 @@
> +## SECTION=3Dpython3
> +
> +config PYTHON3_NUMPY
> +=C2=A0 =C2=A0 =C2=A0tristate
> +=C2=A0 =C2=A0 =C2=A0select PYTHON3
> +=C2=A0 =C2=A0 =C2=A0select HOST_PYTHON3_SETUPTOOLS

Just PYTHON3 is sufficient. HOST_PYTHON3_SETUPTOOLS is selected there.

Michael

> +=C2=A0 =C2=A0 =C2=A0prompt "python3-numpy"
> +=C2=A0 =C2=A0 =C2=A0help
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0NumPy is the fundamental package for scien= tific computing with
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0Python.
> diff --git a/rules/python3-numpy.make b/rules/python3-numpy.make
> new file mode 100644
> index 000000000..6b161856b
> --- /dev/null
> +++ b/rules/python3-numpy.make
> @@ -0,0 +1,57 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2019 by Guillermo Rodriguez <guille.rodriguez@gmail.com>
> +#
> +# For further information about the PTXdist project and license condi= tions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PYTHON3_NUMPY) +=3D python3-numpy
> +
> +#
> +# Paths and names
> +#
> +PYTHON3_NUMPY_VERSION=C2=A0 =C2=A0 =C2=A0 =C2=A0 :=3D 1.17.4
> +PYTHON3_NUMPY_MD5=C2=A0 =C2=A0 :=3D d7d3563cca0b99ba68a3f064a9e46ebe
> +PYTHON3_NUMPY=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = :=3D numpy-$(PYTHON3_NUMPY_VERSION)
> +PYTHON3_NUMPY_SUFFIX :=3D zip
> +PYTHON3_NUMPY_URL=C2=A0 =C2=A0 :=3D https://pypi.python.org/packages/source/n/numpy/$(PYT= HON3_NUMPY).$(PYTHON3_NUMPY_SUFFIX)
> +PYTHON3_NUMPY_SOURCE :=3D $(SRCDIR)/$(PYTHON3_NUMPY).$(PYTHON3_N= UMPY_SUFFIX)
> +PYTHON3_NUMPY_DIR=C2=A0 =C2=A0 :=3D $(BUILDDIR)/$(PYTHON3_NUMPY)
> +PYTHON3_NUMPY_LICENSE=C2=A0 =C2=A0 =C2=A0 =C2=A0 :=3D BSD AND BSD-3-C= lause AND MIT
> +PYTHON3_NUMPY_LICENSE_FILES :=3D \
> +=C2=A0 =C2=A0 =C2=A0file://LICENSE.txt;md5=3D1a32aba007a415aa8a1= c708a0e2b86a1 \
> +=C2=A0 =C2=A0 =C2=A0file://tools/npy_tempita/license.txt;md5=3D<= wbr>c66b85ddcd09296abff87601467724fd \
> +=C2=A0 =C2=A0 =C2=A0file://numpy/core/src/multiarray/dragon4.c;<= wbr>startline=3D2;endline=3D20;md5=3D7f70862b43e17922c5adf18ec84fb720
> +
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +PYTHON3_NUMPY_CONF_TOOL=C2=A0 =C2=A0 =C2=A0 :=3D python3
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/python3-numpy.targetinstall:
> +=C2=A0 =C2=A0 =C2=A0@$(call targetinfo)
> +
> +=C2=A0 =C2=A0 =C2=A0@$(call install_init, python3-numpy)
> +=C2=A0 =C2=A0 =C2=A0@$(call install_fixup, python3-numpy, PRIORITY, o= ptional)
> +=C2=A0 =C2=A0 =C2=A0@$(call install_fixup, python3-numpy, SECTION, ba= se)
> +=C2=A0 =C2=A0 =C2=A0@$(call install_fixup, python3-numpy, AUTHOR, &qu= ot;Guillermo Rodriguez <gu= ille.rodriguez@gmail.com>")
> +=C2=A0 =C2=A0 =C2=A0@$(call install_fixup, python3-numpy, DESCRIPTION= , missing)
> +
> +=C2=A0 =C2=A0 =C2=A0@$(call install_glob, python3-numpy, 0, 0, -, \ > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/usr/lib/python$(PYTH= ON3_MAJORMINOR)/site-packages/numpy,,=C2=A0 *.py)
> +
> +=C2=A0 =C2=A0 =C2=A0@$(call install_finish, python3-numpy)
> +
> +=C2=A0 =C2=A0 =C2=A0@$(call touch)
> +
> +# vim: syntax=3Dmake
> --
> 2.21.0
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de >

--
Pengutronix e.K.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
Steuerwalder Str. 21=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0| http://www.pengutronix.de/=C2=A0 |
31137 Hildesheim, Germany=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 | Phone: +49-5121-206917-0=C2=A0 =C2=A0 |
Amtsgericht Hildesheim, HRA 2686=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| = Fax:=C2=A0 =C2=A0+49-5121-206917-5555 |


--
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com
--00000000000035bee70597683474-- --===============0735159496== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de --===============0735159496==--