From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iZ7vd-0004bi-QK for ptxdist@pengutronix.de; Mon, 25 Nov 2019 07:32:57 +0100 Received: from mol by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1iZ7vd-0008WU-Ip for ptxdist@pengutronix.de; Mon, 25 Nov 2019 07:32:57 +0100 Date: Mon, 25 Nov 2019 07:32:57 +0100 From: Michael Olbrich Message-ID: <20191125063257.GA14948@pengutronix.de> References: <20191119123905.10976-1-guille.rodriguez@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191119123905.10976-1-guille.rodriguez@gmail.com> Subject: Re: [ptxdist] [PATCH v7] 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: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de On Tue, Nov 19, 2019 at 01:39:05PM +0100, Guillermo Rodr=EDguez 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 > v7: Removed SETUPTOOLS dependency, reformatted sse2 patch header > = > .../numpy-1.17.4/0001-remove-sse2-flag.patch | 27 +++++++++ > patches/numpy-1.17.4/series | 1 + > rules/python3-numpy.in | 9 +++ > rules/python3-numpy.make | 57 +++++++++++++++++++ > 4 files changed, 94 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/n= umpy-1.17.4/0001-remove-sse2-flag.patch > new file mode 100644 > index 000000000..2c88b429b > --- /dev/null > +++ b/patches/numpy-1.17.4/0001-remove-sse2-flag.patch > @@ -0,0 +1,27 @@ > +From 4708211dc86d396f30c54bf71bc7194338272637 Mon Sep 17 00:00:00 2001 > +From: mattip > +Date: Mon, 11 Nov 2019 12:48:00 -0700 > +Subject: [PATCH] BUILD: remove SSE2 flag from numpy.random builds > + > +This is a backport of https://github.com/numpy/numpy/pull/14878 > + > +--- > + numpy/random/setup.py | 5 ----- > + 1 file changed, 5 deletions(-) > + > +diff --git a/numpy/random/setup.py b/numpy/random/setup.py > +index ca01250f437..f9059d7d76a 100644 > +--- a/numpy/random/setup.py > ++++ b/numpy/random/setup.py > +@@ -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..174a2bae1 > --- /dev/null > +++ b/rules/python3-numpy.in > @@ -0,0 +1,9 @@ > +## SECTION=3Dpython3 > + > +config PYTHON3_NUMPY > + tristate > + select PYTHON3 > + 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 conditio= ns > +# 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_SUF= FIX) > +PYTHON3_NUMPY_DIR :=3D $(BUILDDIR)/$(PYTHON3_NUMPY) > +PYTHON3_NUMPY_LICENSE :=3D BSD AND BSD-3-Clause AND MIT BSD is not a valid SPDX identifier. Which license does this refer to? No need to resent it, I can do a fixup, but I need to know what to change. Michael > +PYTHON3_NUMPY_LICENSE_FILES :=3D \ > + file://LICENSE.txt;md5=3D1a32aba007a415aa8a1c708a0e2b86a1 \ > + file://tools/npy_tempita/license.txt;md5=3Dc66b85ddcd09296abff876014677= 24fd \ > + file://numpy/core/src/multiarray/dragon4.c;startline=3D2;endline=3D20;m= d5=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 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=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 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de