8000 Merge pull request #14630 from mattip/build_src-option · numpy/numpy@3c81faf · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c81faf

Browse files
authored
Merge pull request #14630 from mattip/build_src-option
BUILD: change to build_src --verbose-cfg, runtests.py --debug-info
2 parents 007b323 + 9fc355b commit 3c81faf

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
python3 -m pip install --user -r test_requirements.txt && \
3030
python3 -m pip install . && \
3131
F77=gfortran-5 F90=gfortran-5 \
32-
CFLAGS='-UNDEBUG -std=c99' python3 runtests.py -n --debug-configure --mode=full -- -rsx --junitxml=junit/test-results.xml && \
32+
CFLAGS='-UNDEBUG -std=c99' python3 runtests.py -n --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml && \
3333
python3 tools/openblas_support.py --check_version $(OpenBLAS_version)"
3434
displayName: 'Run 32-bit Ubuntu Docker Build / Tests'
3535
- task: PublishTestResults@2
@@ -94,7 +94,7 @@ jobs:
9494
displayName: 'Check for unreachable code paths in Python modules'
9595
# prefer usage of clang over gcc proper
9696
# to match likely scenario on many user mac machines
97-
- script: python setup.py build -j 4 build_src -v install
97+
- script: python setup.py build -j 4 build_src --verbose-cfg install
9898
displayName: 'Build NumPy'
9999
env:
100100
BLAS: None

doc/release/upcoming_changes/14518.change.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ part of configuring NumPy, the files ``_numpyconfig.h`` and ``config.h`` are
55
created by probing support for various runtime functions and routines.
66
Previously, the very verbose compiler output during this stage clouded more
77
important information. By default the output is silenced. Running ``runtests.py
8-
--debug-configure`` will add ``-v`` to the ``build_src`` subcommand, which
9-
will restore the previous behaviour.
8+
--debug-info`` will add ``--verbose-cfg`` to the ``build_src`` subcommand,
9+
which will restore the previous behaviour.
1010

1111
Adding ``CFLAGS=-Werror`` to turn warnings into errors would trigger errors
1212
during the configuration. Now ``runtests.py --warn-error`` will add

numpy/distutils/command/build_src.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ class build_src(build_ext.build_ext):
5353
('inplace', 'i',
5454
"ignore build-lib and put compiled extensions into the source " +
5555
"directory alongside your pure Python modules"),
56-
('verbose', 'v',
56+
('verbose-cfg', None,
5757
"change logging level from WARN to INFO which will show all " +
5858
"compiler output")
5959
]
6060

61-
boolean_options = ['force', 'inplace', 'verbose']
61+
boolean_options = ['force', 'inplace', 'verbose-cfg']
6262

6363
help_options = []
6464

@@ -79,7 +79,7 @@ def initialize_options(self):
7979
self.swig_opts = None
8080
self.swig_cpp = None
8181
self.swig = None
82-
self.verbose = None
82+
self.verbose_cfg = None
8383

8484
def finalize_options(self):
8585
self.set_undefined_options('build',
@@ -370,7 +370,7 @@ def generate_sources(self, sources, extension):
370370
+name.split('.')[:-1]))
371371
self.mkpath(build_dir)
372372

373-
if self.verbose:
373+
if self.verbose_cfg:
374374
new_level = log.INFO
375375
else:
376376
new_level = log.WARN

runtests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def main(argv):
7171
parser = ArgumentParser(usage=__doc__.lstrip())
7272
parser.add_argument("--verbose", "-v", action="count", default=1,
7373
help="more verbosity")
74-
parser.add_argument("--debug-configure", action="store_true",
75-
help=("add -v to build_src to show compiler "
74+
parser.add_argument("--debug-info", action="store_true",
75+
help=("add --verbose-cfg to build_src to show compiler "
7676
"configuration output while creating "
7777
"_numpyconfig.h and config.h"))
7878
parser.add_argument("--no-build", "-n", action="store_true", default=False,
@@ -376,8 +376,8 @@ def build_project(args):
376376
cmd += ["build"]
377377
if args.parallel > 1:
378378
cmd += ["-j", str(args.parallel)]
379-
if args.debug_configure:
380-
cmd += ["build_src", "--verbose"]
379+
if args.debug_info:
380+
cmd += ["build_src", "--verbose-cfg"]
381381
if args.warn_error:
382382
cmd += ["--warn-error"]
383383
# Install; avoid producing eggs so numpy can be imported from dst_dir.

shippable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ build:
4848
# check OpenBLAS version
4949
- python tools/openblas_support.py --check_version 0.3.7
5050
# run the test suite
51-
- python runtests.py --debug-configure --show-build-log -- -rsx --junit-xml=$SHIPPABLE_REPO_DIR/shippable/testresults/tests.xml -n 2 --durations=10
51+
- python runtests.py --debug-info --show-build-log -- -rsx --junit-xml=$SHIPPABLE_REPO_DIR/shippable/testresults/tests.xml -n 2 --durations=10
5252

5353
cache: true
5454
cache_dir_list:

tools/pypy-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ echo pypy3 version
3939
pypy3/bin/pypy3 -c "import sys; print(sys.version)"
4040
echo
4141

42-
pypy3/bin/pypy3 runtests.py --debug-configure --show-build-log -v -- -rsx \
42+
pypy3/bin/pypy3 runtests.py --debug-info --show-build-log -v -- -rsx \
4343
--junitxml=junit/test-results.xml --durations 10
4444

4545
echo Make sure the correct openblas has been linked in

tools/travis-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ setup_base()
5252
else
5353
# Python3.5-dbg on travis seems to need this
5454
export CFLAGS=$CFLAGS" -Wno-maybe-uninitialized"
55-
$PYTHON setup.py build build_src -v build_ext --inplace 2>&1 | tee log
55+
$PYTHON setup.py build build_src --verbose-cfg build_ext --inplace 2>&1 | tee log
5656
fi
5757
grep -v "_configtest" log \
5858
| grep -vE "ld returned 1|no previously-included files matching|manifest_maker: standard file '-c'" \
@@ -151,7 +151,7 @@ if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
151151
export F90='gfortran --coverage'
152152
export LDFLAGS='--coverage'
153153
fi
154-
$PYTHON setup.py build build_src -v bdist_wheel
154+
$PYTHON setup.py build build_src --verbose-cfg bdist_wheel
155155
# Make another virtualenv to install into
156156
virtualenv --python=`which $PYTHON` venv-for-wheel
157157
. venv-for-wheel/bin/activate

0 commit comments

Comments
 (0)
0