Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#29025 closed defect (fixed)

numpy: site.cfg needs a [DEFAULT] section

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.1
Component: packages: standard Keywords:
Cc: dimpase, jhpalmieri, fbissey, slelievre, tscrim, isuruf, saraedum Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: Reported upstream. Developers acknowledge bug. Work issues:
Branch: 85147f9 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description

numpy 1.16.1 seems to ignore the [ALL] section in this configuration file, but it respects the [DEFAULT] section. Needed for #29013.

Change History (21)

comment:1 Changed 20 months ago by mkoeppe

  • Branch set to u/mkoeppe/numpy__site_cfg_needs_a__default__section

comment:2 Changed 20 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Cc jhpalmieri added
  • Commit set to 85147f9a7bb3741646693b913bbb96fff1e11432
  • Status changed from new to needs_review

New commits:

85147f9build/pkgs/numpy/lapack_conf.py: Add a [DEFAULT] section to site.cfg

comment:3 Changed 20 months ago by mkoeppe

  • Cc fbissey slelievre added

comment:4 Changed 20 months ago by mkoeppe

  • Cc tscrim added

comment:5 Changed 20 months ago by fbissey

This is weird. The documentation in numpy and everywhere talks about [ALL] and I cannot find anything about [DEFAULT] in the code. Is a different python library used to parse site.cfg and could it have changed its behavior without numpy catching it?

comment:6 Changed 20 months ago by mkoeppe

The file is apparently read by ConfigParser. https://docs.python.org/2/library/configparser.html This page mentions the DEFAULT section.

comment:7 Changed 20 months ago by mkoeppe

The relevant numpy seems to be https://github.com/numpy/numpy/blob/558080ef33de051c52bd1214c372380680cb6800/numpy/distutils/system_info.py

It does not specifically have either ALL or DEFAULT.

comment:8 Changed 20 months ago by mkoeppe

My guess is that site.cfg.example is outdated.

comment:9 Changed 20 months ago by mkoeppe

comment:10 Changed 20 months ago by mkoeppe

  • Report Upstream changed from N/A to Not yet reported upstream; Will do shortly.

comment:11 Changed 20 months ago by mkoeppe

  • Cc isuruf saraedum added

comment:12 Changed 20 months ago by mkoeppe

It looks like in upstream numpy, configuration by site.cfg is not tested at all. Most of the continuous integration scripts install numpy using pip -- and of course, supplying the site.cfg does not work at all if one tries to install the package with pip.

comment:14 Changed 20 months ago by mkoeppe

  • Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.

comment:15 Changed 20 months ago by mkoeppe

Needs review.

comment:16 Changed 20 months ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

lgtm

comment:17 Changed 20 months ago by mkoeppe

Thanks!

comment:18 Changed 20 months ago by mkoeppe

  • Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.

comment:19 Changed 20 months ago by vbraun

  • Branch changed from u/mkoeppe/numpy__site_cfg_needs_a__default__section to 85147f9a7bb3741646693b913bbb96fff1e11432
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:20 Changed 20 months ago by dimpase

  • Commit 85147f9a7bb3741646693b913bbb96fff1e11432 deleted

unfortunately [DEFAULT] section seems to override the other ones, so e.g. it gets impossible to use OpenBLAS from the system. I missed that when testing.

comment:21 Changed 20 months ago by mkoeppe

Follow-up = #29051.

Note: See TracTickets for help on using tickets.