Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Esben Haabendal <esben@geanix.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/2] package/python-scipy: new package
Date: Thu, 26 Sep 2019 16:10:23 +0200	[thread overview]
Message-ID: <874l0ztagg.fsf@geanix.com> (raw)
In-Reply-To: <59c0bc63-5a32-eff9-a8dc-42bb9f513acd@mind.be> (Arnout Vandecappelle's message of "Wed, 25 Sep 2019 00:24:21 +0200")

Arnout Vandecappelle <arnout@mind.be> writes:

> On 24/09/2019 16:39, Esben Haabendal wrote:
>
>  We'd like a bit more commit log to explain the intricacies of this package -
> see below.

I will try to add something...

>> ---
>>  DEVELOPERS                             |  1 +
>>  package/Config.in                      |  1 +
>>  package/python-scipy/Config.in         | 20 ++++++++++++++
>>  package/python-scipy/python-scipy.hash |  9 +++++++
>>  package/python-scipy/python-scipy.mk   | 37 ++++++++++++++++++++++++++
>>  5 files changed, 68 insertions(+)
>>  create mode 100644 package/python-scipy/Config.in
>>  create mode 100644 package/python-scipy/python-scipy.hash
>>  create mode 100644 package/python-scipy/python-scipy.mk
>> 
>> diff --git a/DEVELOPERS b/DEVELOPERS
>> index 67a0fef0886d..975a197404bb 100644
>> --- a/DEVELOPERS
>> +++ b/DEVELOPERS
>> @@ -723,6 +723,7 @@ F:	package/szip/
>>  N:	Esben Haabendal <esben@haabendal.dk>
>>  F:	boot/gummiboot/
>>  F:	package/python-kiwisolver/
>> +F:	package/python-scipy/
>>  
>>  N:	Etienne Carriere <etienne.carriere@linaro.org>
>>  F:	boot/optee-os/
>> diff --git a/package/Config.in b/package/Config.in
>> index dbf297f4df39..818a2abca591 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -1056,6 +1056,7 @@ menu "External python modules"
>>  	source "package/python-scapy/Config.in"
>>  	source "package/python-scapy3k/Config.in"
>>  	source "package/python-schedule/Config.in"
>> +	source "package/python-scipy/Config.in"
>>  	source "package/python-sdnotify/Config.in"
>>  	source "package/python-secretstorage/Config.in"
>>  	source "package/python-see/Config.in"
>> diff --git a/package/python-scipy/Config.in b/package/python-scipy/Config.in
>> new file mode 100644
>> index 000000000000..8396b507d2ca
>> --- /dev/null
>> +++ b/package/python-scipy/Config.in
>> @@ -0,0 +1,20 @@
>> +config BR2_PACKAGE_PYTHON_SCIPY
>> +	bool "python-scipy"
>> +	depends on BR2_PACKAGE_PYTHON3
>> +	depends on BR2_TOOLCHAIN_HAS_FORTRAN
>> +	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
>> +	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
>
>  You forgot
>
>         depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC # clapack
>         depends on !BR2_m68k_cf # clapack
> 	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
>
>  Also, the 4 arch dependencies should be first, and then the toolchain
> dependencies. I'm not sure where we put the python3 dependency.

I will fix that for next version.

>> +	select BR2_PACKAGE_HOST_PYTHON_CYTHON
>> +	select BR2_PACKAGE_PYTHON_NUMPY
>> +	select BR2_PACKAGE_OPENBLAS
>> +	select BR2_PACKAGE_CLAPACK
>
>  This clapack, fortran, openblas stuff really needs some explanation in the
> commit message. Why clapack and not lapack or the lapack bundled with openblas?
> Why Fortran? etc.

I will try and add something.

Actually, I don't see why openblas is needed, as clapack can provide
both blas and lapack.  Current python-numpy package uses clapack for
both, so it makes most sense to do the same here.

>> +	help
>> +	  The SciPy library is one of the core packages that make up the SciPy
>> +	  stack. It provides many user-friendly and efficient numerical
>> +	  routines such as routines for numerical integration, interpolation,
>> +	  optimization, linear algebra and statistics.
>> +
>> +	  https://www.scipy.org/scipylib/
>> +
>> +comment "python-scipy needs a toolchain w/ fortran"
>> +	depends on !BR2_TOOLCHAIN_HAS_FORTRAN
>
>  Python3 and glibc/musl dependency should be added as well, and the arch
> dependencies should be repeated. I.e.

glibc/musl dependency makes sense.  But I don't think that python3 arch
dependencies should cause a comment.  As I understand it, these comments
are meant for things that the user can easily do something about, such
as enabling a compatible toolchain.

I will add a simple comment for glibc/musl.

Do you agree?  Are there examples of other packages adding a lot of arch
dependencies to comment?

> 	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
> 	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
>         depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC # clapack
>         depends on !BR2_m68k_cf # clapack
>
> 	depends on !BR2_TOOLCHAIN_HAS_FORTRAN || \
> 		!(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) || \
> 		!BR2_PACKAGE_PYTHON3
>
>> diff --git a/package/python-scipy/python-scipy.mk b/package/python-scipy/python-scipy.mk
>> new file mode 100644
>> index 000000000000..4ba3f286431b
>> --- /dev/null
>> +++ b/package/python-scipy/python-scipy.mk
>> @@ -0,0 +1,37 @@
>> +################################################################################
>> +#
>> +# python-scipy
>> +#
>> +################################################################################
>> +
>> +PYTHON_SCIPY_VERSION = 1.3.1
>> +PYTHON_SCIPY_SITE = $(call github,scipy,scipy,v$(PYTHON_SCIPY_VERSION))
>> +PYTHON_SCIPY_LICENSE = BSD-3-Clause, BSD-2-Clause, BSD, BSD-Style, PSF, \
>
>  PSF is no SPDX abbreviation, it's Python-2.0
>
>  However, IIUC this license only applies to the scipy-sphinx-theme, which isn't
> used in our build, so it can be removed from the license list.

Will fix.

>> +	Apache-2.0, MIT
>> +PYTHON_SCIPY_LICENSE_FILES = LICENSE.txt \
>
>  Split the line before already, so
>
> PYTHON_SCIPY_LICENSE_FILES = \
> 	LICENSE.txt \

Is this policy?  There are 23 examples of doing it that way, and 17 the
opposite.

I will change it in next version, but are you sure which way is "the
right way"?

>  Also, I think it's useful to add the LICENSES_bundled.txt, because changes in
> that file should be noticed (i.e. the hash changes).

That file is not included in this scipy release we are using.

>> +define PYTHON_SCIPY_CONFIGURE_CMDS
>> +	-rm -f $(@D)/site.cfg
>> +	echo "[DEFAULT]" >> $(@D)/site.cfg
>> +	echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg
>> +	echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg
>
>  It would also be useful to comment about the site.cfg in the commit
>  message.

I will try and add something here also.

/Esben

  reply	other threads:[~2019-09-26 14:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 14:39 [Buildroot] [PATCH v3 1/2] package/python-numpy: fixup numpy distutils for cross compilation Esben Haabendal
2019-09-24 14:39 ` [Buildroot] [PATCH v3 2/2] package/python-scipy: new package Esben Haabendal
2019-09-24 22:24   ` Arnout Vandecappelle
2019-09-26 14:10     ` Esben Haabendal [this message]
2019-09-29 12:51       ` Arnout Vandecappelle
2019-09-30  8:18         ` Esben Haabendal
2019-09-24 21:40 ` [Buildroot] [PATCH v3 1/2] package/python-numpy: fixup numpy distutils for cross compilation Arnout Vandecappelle
2019-09-26 11:18   ` Esben Haabendal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874l0ztagg.fsf@geanix.com \
    --to=esben@geanix.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox