Skip to content

BUILD: change to build_src --verbose-cfg, runtests.py --debug-info #14630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2019

Conversation

mattip
Copy link
Member

@mattip mattip commented Oct 3, 2019

In gh-14518 we repurposed the verbose option to build_src in order to quiet the configuration compiler output. Unfortunately it is reset by distutils to the value of dist.verbose. Change the name to --verbose-cfg and remove the short -v option.

Also changed the runtests.py option to debug-info as per this comment

@mattip mattip changed the title BUILD: change to build_src --verbose_cfg, runtests.py --debug-info BUILD: change to build_src --verbose-cfg, runtests.py --debug-info Oct 3, 2019
@mattip mattip requested a review from charris October 5, 2019 10:30
@charris
Copy link
Member

charris commented Oct 7, 2019

I'm a bit concerned about change the --verbose and -v options. The build_src command is supposedly private, but is present in the API. Guess we might find out if it is a problem.

Note that testing uses --verbose=<number> to select verbosity, with short -v, -vv, -vvv options. We might want to go that route.

@charris
Copy link
Member

charris commented Oct 7, 2019

What happens to the reset verbose flag, do we just ignore it now?

@mattip
Copy link
Member Author

mattip commented Oct 7, 2019

What happens to the reset verbose flag, do we just ignore it now?

I didn't change that code at all.

Currently the default when building numpy is 'verbose'. The -v flag to runtests.py only impacts testing, not building. I am not sure we want to mix flags to the two different tasks

@mattip
Copy link
Member Author

mattip commented Oct 7, 2019

Edit: ahh, you mean to change to use an additional/different -v flag to only setup.py? The help for that command says:

$ python setup.py --help
...
Global options:
  --verbose (-v)      run verbosely (default)
  --quiet (-q)        run quietly (turns verbosity off)
...

What do you think of a strategy like:

  • the default runtest.py is to call setup.py --quiet
  • add a verbose-build flag to runtests.py that switches to setup.py --verbose
  • all CI uses the verbose build

This might need more tweaking, since with current HEAD the build output is very terse (too terse???):

$ python setup.py --quiet build 
Processing numpy/random/bounded_integers.pxd.in
Processing numpy/random/philox.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/sfc64.pyx
Processing numpy/random/pcg64.pyx
Processing numpy/random/common.pyx
Processing numpy/random/mt19937.pyx
Processing numpy/random/bounded_integers.pyx.in
Processing numpy/random/mtrand.pyx
Processing numpy/random/generator.pyx
Running from numpy source directory.
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
Cythonizing sources
non-existing path in 'numpy/distutils': 'site.cfg'

@mattip
Copy link
Member Author

mattip commented Oct 7, 2019

It seems --quiet is too terse: it hides existing warning when building (for instance with clang-8). We do have the --warn-error option, but forcing that to true by default would fail on any platform that still has warnings. Maybe this PR should be viewed as an hack that should be removed when we clean up the remaining warnings?
xref gh-13816, this comment

@mattip
Copy link
Member Author

mattip commented Oct 10, 2019

@charris ping

@charris
Copy link
Member

charris commented Oct 12, 2019

Let's put this in as a step on the way. I don't worry about this much and don't think some experimentation will hurt.

@charris charris merged commit 3c81faf into numpy:master Oct 12, 2019
@charris
Copy link
Member

charris commented Oct 12, 2019

Thanks Matti.

@mattip mattip deleted the build_src-option branch October 13, 2020 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants