Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#29025 closed defect (fixed)

numpy: site.cfg needs a [DEFAULT] section

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-9.1
Component: packages: standard Keywords:
Cc: Dima Pasechnik, John Palmieri, François Bissey, Samuel Lelièvre, Travis Scrimshaw, Isuru Fernando, Julian Rüth 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 3 years ago by Matthias Köppe

Branch: u/mkoeppe/numpy__site_cfg_needs_a__default__section

comment:2 Changed 3 years ago by Matthias Köppe

Authors: Matthias Koeppe
Cc: John Palmieri added
Commit: 85147f9a7bb3741646693b913bbb96fff1e11432
Status: newneeds_review

New commits:

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

comment:3 Changed 3 years ago by Matthias Köppe

Cc: François Bissey Samuel Lelièvre added

comment:4 Changed 3 years ago by Matthias Köppe

Cc: Travis Scrimshaw added

comment:5 Changed 3 years ago by François Bissey

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 3 years ago by Matthias Köppe

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

comment:7 Changed 3 years ago by Matthias Köppe

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 3 years ago by Matthias Köppe

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

comment:9 Changed 3 years ago by Matthias Köppe

comment:10 Changed 3 years ago by Matthias Köppe

Report Upstream: N/ANot yet reported upstream; Will do shortly.

comment:11 Changed 3 years ago by Matthias Köppe

Cc: Isuru Fernando Julian Rüth added

comment:12 Changed 3 years ago by Matthias Köppe

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 3 years ago by Matthias Köppe

Report Upstream: Not yet reported upstream; Will do shortly.Reported upstream. No feedback yet.

comment:15 Changed 3 years ago by Matthias Köppe

Needs review.

comment:16 Changed 3 years ago by Dima Pasechnik

Reviewers: Dima Pasechnik
Status: needs_reviewpositive_review

lgtm

comment:17 Changed 3 years ago by Matthias Köppe

Thanks!

comment:18 Changed 3 years ago by Matthias Köppe

Report Upstream: Reported upstream. No feedback yet.Reported upstream. Developers acknowledge bug.

comment:19 Changed 3 years ago by Volker Braun

Branch: u/mkoeppe/numpy__site_cfg_needs_a__default__section85147f9a7bb3741646693b913bbb96fff1e11432
Resolution: fixed
Status: positive_reviewclosed

comment:20 Changed 3 years ago by Dima Pasechnik

Commit: 85147f9a7bb3741646693b913bbb96fff1e11432

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 3 years ago by Matthias Köppe

Follow-up = #29051.

Note: See TracTickets for help on using tickets.