diff options
author | mattip <matti.picus@gmail.com> | 2019-10-25 11:45:11 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-10-25 12:42:08 +0300 |
commit | 4c2b4d8fb2d1b37df621433fbb2f0e3dabb82058 (patch) | |
tree | 5787f0f334a888d74b64b55e48d74819da385eeb | |
parent | c47061de6fc234e0d4438bc4cef6510c89a495c2 (diff) | |
download | numpy-4c2b4d8fb2d1b37df621433fbb2f0e3dabb82058.tar.gz |
BUILD, DOC: remove the std=c99 flag from docs, builds, add release note
-rw-r--r-- | INSTALL.rst.txt | 14 | ||||
-rw-r--r-- | azure-pipelines.yml | 2 | ||||
-rw-r--r-- | doc/release/upcoming_changes/14771.improvement.rst | 6 | ||||
-rw-r--r-- | doc/source/dev/development_environment.rst | 3 | ||||
-rwxr-xr-x | tools/travis-test.sh | 6 |
5 files changed, 13 insertions, 18 deletions
diff --git a/INSTALL.rst.txt b/INSTALL.rst.txt index bd2f4f92c..d6c42bad7 100644 --- a/INSTALL.rst.txt +++ b/INSTALL.rst.txt @@ -28,7 +28,7 @@ Building NumPy requires the following installed software: 2) Cython >= 0.29.2 (for development versions of numpy, not for released versions) - + 3) pytest__ (optional) 1.15 or later This is required for testing numpy, but not for using it. @@ -37,7 +37,7 @@ Python__ http://www.python.org pytest__ http://pytest.readthedocs.io -.. note:: +.. note:: If you want to build NumPy in order to work on NumPy itself, use ``runtests.py``. For more details, see @@ -77,11 +77,7 @@ skipped when running the test suite if no Fortran compiler is available. For building Scipy a Fortran compiler is needed though, so we include some details on Fortran compilers in the rest of this section. -On OS X and Linux, all common compilers will work. Note that C99 support is -required. For compilers that don't support the C99 language standard by -default (such as ``gcc`` versions < 5.0), it should be enabled. For ``gcc``:: - - export CFLAGS='-std=c99' +On OS X and Linux, all common compilers will work. For Fortran, ``gfortran`` works, ``g77`` does not. In case ``g77`` is installed then ``g77`` will be detected and used first. To explicitly select @@ -117,9 +113,9 @@ details. Windows ------- -The Intel compilers work with Intel MKL, see the application note linked above. +The Intel compilers work with Intel MKL, see the application note linked above. MingwPy__ works with OpenBLAS. -For an overview of the state of BLAS/LAPACK libraries on Windows, see +For an overview of the state of BLAS/LAPACK libraries on Windows, see `here <https://mingwpy.github.io/blas_lapack.html>`_. OS X diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c5ae65dbf..bfb033bb8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,7 +46,7 @@ stages: python3 -m pip install --user -r test_requirements.txt && \ python3 -m pip install . && \ F77=gfortran-5 F90=gfortran-5 \ - CFLAGS='-UNDEBUG -std=c99' python3 runtests.py -n --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml && \ + CFLAGS=-UNDEBUG python3 runtests.py -n --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml && \ python3 tools/openblas_support.py --check_version $(OpenBLAS_version)" displayName: 'Run 32-bit Ubuntu Docker Build / Tests' - task: PublishTestResults@2 diff --git a/doc/release/upcoming_changes/14771.improvement.rst b/doc/release/upcoming_changes/14771.improvement.rst new file mode 100644 index 000000000..847f21b5e --- /dev/null +++ b/doc/release/upcoming_changes/14771.improvement.rst @@ -0,0 +1,6 @@ +``std=c99`` added if compiler is named ``gcc`` +---------------------------------------------- + +GCC before version 5 requies the ``-std=c99`` command line argument. Newer +compilers automatically turn on C99 mode. The compiler setup code will +automatically add the code if the compiler name has ``gcc`` in it. diff --git a/doc/source/dev/development_environment.rst b/doc/source/dev/development_environment.rst index 9d618cc9f..297502b31 100644 --- a/doc/source/dev/development_environment.rst +++ b/doc/source/dev/development_environment.rst @@ -11,8 +11,7 @@ Recommended development setup Since NumPy contains parts written in C and Cython that need to be compiled before use, make sure you have the necessary compilers and Python development headers installed - see :ref:`building-from-source`. Building -NumPy as of version ``1.17`` requires a C99 compliant compiler. For -some older compilers this may require ``export CFLAGS='-std=c99'``. +NumPy as of version ``1.17`` requires a C99 compliant compiler. Having compiled code also means that importing NumPy from the development sources needs some additional steps, which are explained below. For the rest diff --git a/tools/travis-test.sh b/tools/travis-test.sh index 6094f0ee6..e04a33143 100755 --- a/tools/travis-test.sh +++ b/tools/travis-test.sh @@ -36,8 +36,6 @@ setup_base() sysflags="$($PYTHON -c "from distutils import sysconfig; \ print (sysconfig.get_config_var('CFLAGS'))")" export CFLAGS="$sysflags $werrors -Wlogical-op -Wno-sign-compare" - # use c99 - export CFLAGS=$CFLAGS" -std=c99" # We used to use 'setup.py install' here, but that has the terrible # behaviour that if a copy of the package is already installed in the # install location, then the new copy just gets dropped on top of it. @@ -141,8 +139,6 @@ if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then $PIP install -U virtualenv # ensure some warnings are not issued export CFLAGS=$CFLAGS" -Wno-sign-compare -Wno-unused-result" - # use c99 - export CFLAGS=$CFLAGS" -std=c99" # adjust gcc flags if C coverage requested if [ -n "$RUN_COVERAGE" ]; then export NPY_DISTUTILS_APPEND_FLAGS=1 @@ -169,8 +165,6 @@ elif [ -n "$USE_SDIST" ] && [ $# -eq 0 ]; then $PYTHON -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" # ensure some warnings are not issued export CFLAGS=$CFLAGS" -Wno-sign-compare -Wno-unused-result" - # use c99 - export CFLAGS=$CFLAGS" -std=c99" $PYTHON setup.py sdist # Make another virtualenv to install into virtualenv --python=`which $PYTHON` venv-for-wheel |