[Numpy-svn] [numpy/numpy] 63e0f6: BLD, ENH: Reading of extra flags from site.cfg to ...

GitHub noreply at github.com
Fri Apr 24 22:11:35 EDT 2015


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 63e0f6ac81b8bfabc74a441dbf08eeaead091fbb
      https://github.com/numpy/numpy/commit/63e0f6ac81b8bfabc74a441dbf08eeaead091fbb
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-23 (Mon, 23 Feb 2015)

  Changed paths:
    M numpy/distutils/system_info.py

  Log Message:
  -----------
  BLD, ENH: Reading of extra flags from site.cfg to extend flexibility

Addition to the distutils module to be able
to read in more optional arguments and flags
from the site.cfg file.

Currently are these additional options read:

runtime_library_dirs:
  It allows users to set the runtime
  library directories so that LD_LIBRARY_PATH can be ignored.
  This has the same format as the library_dirs option.

extra_compile_args:
  This allows the user to add specific compiler
  flags when compiling sources.
  There will be no formatting/checking of these additional compile
  flags, the compiler should complain if something is wrong.

extra_link_args:
  This allows the user to add specific linker flags
  when linking the .so objects.
  There will be no formatting/checking of these additional compile
  flags, the linker should complain if something is wrong.

When the config is runned it automatically prints out the
read in information, thereby allowing the user to see
what has been set and what has not.

Tested with and without flags to check that it builds correctly.


  Commit: e87ad6eb8ff7d7705abb20d523e21c67e508b0e6
      https://github.com/numpy/numpy/commit/e87ad6eb8ff7d7705abb20d523e21c67e508b0e6
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-24 (Tue, 24 Feb 2015)

  Changed paths:
    M doc/release/1.10.0-notes.rst
    A numpy/distutils/tests/test_system_info.py
    M site.cfg.example

  Log Message:
  -----------
  ENH: Added tests to the extra options read in

A simple test (distutils/testing/test_system_info.py)
to check that the options are read in correctly has been added.
This test has a few faults:

A) It does not allow strict library checks as that can be
   _very_ system dependent.
B) It compiles some simple C-programs but does currently not link
   them to a shared library.
C) As such the test does not check that the flags are actually used.

To circumvent this one should:

A) Make a library of the compiled sources.
B) Check that a runtime_library_dirs is working by checking
   with ldd
C) Make a preprocessor flag to check the output of two commands which
   should differ according to the flags in each block

I am not too much into the distutils compiler suite. So I have not
endeavoured on this path.

- The current test shows that the flags are read in by the standard system_info
  object and can thus be considered a "stable" solution.

- Added note of the 1.10 release schedule.

- Corrected the site.cfg.example, added runtime_library_dirs to
  the OpenBLAS example where it seems appropriate.

- Bugfix for the site.cfg.example (the [DEFAULT] block should be
  name [ALL])
  This might have lead to some confusion, but many of the libraries
  are linked explicitly by their own sections, hence it might not have
  been caught.


  Commit: 0e7843949e8fec48c562b55166cac136230f72d1
      https://github.com/numpy/numpy/commit/0e7843949e8fec48c562b55166cac136230f72d1
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-24 (Tue, 24 Feb 2015)

  Changed paths:
    M numpy/distutils/tests/test_system_info.py

  Log Message:
  -----------
  BUG: Trying to fix travis builds

The test on Travis does not allow getcwd on python 2.6

The test for python 3+ already is in unicode, hence the
str representation was wrong.


  Commit: 43fb77f85726a380aefa8cf8e82625384b928d5a
      https://github.com/numpy/numpy/commit/43fb77f85726a380aefa8cf8e82625384b928d5a
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-24 (Tue, 24 Feb 2015)

  Changed paths:
    M numpy/distutils/tests/test_system_info.py

  Log Message:
  -----------
  BUG: Trying to fix travis builds

The error of getcwd on 2.6 was due to previous fault.
We should not request include_dirs as they are not provided.

For python 3 I forgot the top ascii writing.


  Commit: f91796046592ff876b74db14544adaab21e31f93
      https://github.com/numpy/numpy/commit/f91796046592ff876b74db14544adaab21e31f93
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M doc/release/1.10.0-notes.rst
    M numpy/distutils/system_info.py
    M numpy/distutils/tests/test_system_info.py

  Log Message:
  -----------
  BUG: PEP corrections and streamlined with numpy dev line

Changed self.assert* to assert_ instances through numpys
own testing utilities.

Fixes for the rst document.

Removed unnecessary import statements in the test.


  Commit: a6c2443a646eb46b0bca9d8560d52d5b9fa87c9d
      https://github.com/numpy/numpy/commit/a6c2443a646eb46b0bca9d8560d52d5b9fa87c9d
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M numpy/distutils/system_info.py
    M numpy/distutils/tests/test_system_info.py

  Log Message:
  -----------
  BUG: PEP corrections

More corrections pointed out by Ralf

Changed the get_standard_file to a fully temporary
file. This means that the __init__ diverges a bit
from the system_info object. However, it only has
to do with the setup for the test. All internal things
regarding the object have not been altered.
I have checked on my box that all files/directories are removed.


  Commit: a2ec60c6b0ba610c635626d9fe10b569d6365a7f
      https://github.com/numpy/numpy/commit/a2ec60c6b0ba610c635626d9fe10b569d6365a7f
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-25 (Wed, 25 Feb 2015)

  Changed paths:
    M numpy/distutils/tests/test_system_info.py

  Log Message:
  -----------
  BUG: Python3 fix

Direct writing to files is not the same for 2vs3.
Hence we now close the file handle, re-open it
and write using the file.


  Commit: 98add1697398d93469889792739ca0721ac65284
      https://github.com/numpy/numpy/commit/98add1697398d93469889792739ca0721ac65284
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-26 (Thu, 26 Feb 2015)

  Changed paths:
    M doc/release/1.10.0-notes.rst
    M numpy/distutils/system_info.py
    M numpy/distutils/tests/test_system_info.py
    M site.cfg.example

  Log Message:
  -----------
  ENH: rpath and runtime_library_dirs equivalent

The original distutils assumes runtime_library_dirs to
be located in rpath, however, the internal structures assumes
the keyword to be runtime_library_dirs.
For now numpy.distutils handles both equivalently.

The test has been updated to also test the rpath solution.


  Commit: 29b9480f62fd01b6d19da39391bd522cc66bdc6b
      https://github.com/numpy/numpy/commit/29b9480f62fd01b6d19da39391bd522cc66bdc6b
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-26 (Thu, 26 Feb 2015)

  Changed paths:
    M numpy/distutils/system_info.py
    M numpy/distutils/tests/test_system_info.py

  Log Message:
  -----------
  BUG: Had thought the defaults where made of lists, it is simply a str.

Changed all lists to strings


  Commit: 525f0cd85fa270ee0fb843a8cfdd21dfe98238cd
      https://github.com/numpy/numpy/commit/525f0cd85fa270ee0fb843a8cfdd21dfe98238cd
  Author: Nick Papior Andersen <nickpapior at gmail.com>
  Date:   2015-02-27 (Fri, 27 Feb 2015)

  Changed paths:
    M numpy/distutils/fcompiler/intel.py
    M numpy/distutils/fcompiler/pg.py
    M numpy/distutils/fcompiler/sun.py

  Log Message:
  -----------
  BUG: rpath was not implemented for numpy.distutils.fcompiler

This bug-fix only applies for non gnu-compilers.

The fortran compilers in numpy inherited the Ccompier class
which had the runtime library directories NotImplemented.
Hence the compilers need to define their own runtime library
path.
I have added that information to the intel/pgi/sun compilers.
The rest are either already implemented or I do not know them.

I have tested the bug-fix with intel compilers of numpy AND the
subsequent installation of scipy (which relies on the fortran
compilers). Hence this bug will only occur when linking with
the fortran compilers.


  Commit: a8b1c0c6d10e1939d9001a52a962ecd6ef06500c
      https://github.com/numpy/numpy/commit/a8b1c0c6d10e1939d9001a52a962ecd6ef06500c
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2015-04-24 (Fri, 24 Apr 2015)

  Changed paths:
    M doc/release/1.10.0-notes.rst
    M numpy/distutils/fcompiler/intel.py
    M numpy/distutils/fcompiler/pg.py
    M numpy/distutils/fcompiler/sun.py
    M numpy/distutils/system_info.py
    A numpy/distutils/tests/test_system_info.py
    M site.cfg.example

  Log Message:
  -----------
  Merge pull request #5597 from zerothi/ENH-distutils

BLD, ENH: Reading of extra flags from site.cfg to extend flexibility


Compare: https://github.com/numpy/numpy/compare/77c20d88ddb5...a8b1c0c6d10e


More information about the Numpy-svn mailing list