summaryrefslogtreecommitdiff
path: root/numpy/distutils
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #13499 from Bharat123rox/file-closingEric Wieser2019-05-123-30/+32
|\ | | | | MAINT: Use with statement to open/close files to fix LGTM alerts
| * Revert contextlib changesBharat123rox2019-05-082-15/+8
| |
| * Add missing importsBharat123rox2019-05-082-0/+3
| |
| * Add code review suggestions from @eric-wieserBharat123rox2019-05-083-36/+38
| |
| * Fixed possible regressionsBharat123rox2019-05-082-0/+4
| |
| * Use with statement to open/close files to fix LGTM alertsBharat123rox2019-05-073-58/+58
| |
* | Merge pull request #13132 from zerothi/linalg-orderRalf Gommers2019-05-011-107/+194
|\ \ | | | | | | BLD: Allow users to specify BLAS and LAPACK library link order
| * | MAINT: fixed several PYTHONOPTIMIZE=2 failuresNick Papior2019-04-301-10/+10
| | | | | | | | | | | | Signed-off-by: Nick Papior <nickpapior@gmail.com>
| * | BUG: fixed PYTHONOPTIMIZE runNick Papior2019-04-291-1/+1
| | | | | | | | | | | | Signed-off-by: Nick Papior <nickpapior@gmail.com>
| * | MAINT: fixed last issues and questions according to #13132Nick Papior2019-04-291-9/+13
| | | | | | | | | | | | Signed-off-by: Nick Papior <nickpapior@gmail.com>
| * | BUG: fixed lapack_lite sourcesNick Papior2019-03-181-5/+7
| | | | | | | | | | | | Signed-off-by: Nick Papior <nickpapior@gmail.com>
| * | BUG: ensured that warnings/errors are raised when nothing is requestedNick Papior2019-03-181-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a user requests NPY_BLAS/LAPACK_ORDER they can omit Netlib BLAS/LAPACK. In that case there will not be raised anything. This commit fixes this issue so that there will always be issues raised if the user hasn't requested the basic libraries. Signed-off-by: Nick Papior <nickpapior@gmail.com>
| * | ENH: amended documentation and changed env-vars as suggestedNick Papior2019-03-181-19/+16
| | | | | | | | | | | | | | | | | | | | | Also added a test to travis (apparently ATLAS=None... is not tested on circleCI). Signed-off-by: Nick Papior <nickpapior@gmail.com>
| * | ENH: allowed external users to select BLAS and LAPACK library link orderNick Papior2019-03-181-110/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this enhancement compiling numpy would forcefully check BLAS/LAPACK libraries in the following order: BLAS: - mkl - blis - openblas - atlas - accelerate - NetLIB BLAS - LAPACK - mkl - openblas - atlas - accelerate - NetLIB LAPACK This is problematic if a user want to build using, say, OpenBLAS but MKL is installed. Even populating the site.cfg correspondingly one would get a successfull build, but using MKL, if present. The same applies to OpenBLAS vs. ATLAS etc. Especially for developers this may be desirable to check performance with various BLAS/LAPACK libraries. This fixes the above issues by enabling users to forcefully set the order of loads via environment variables: $> export NUMPY_BLAS_ORDER=openblas,mkl,atlas $> python setup.py config ... would first try OpenBLAS (if existing), then MKL, and finally ATLAS. In this case the build would fail if neither of OpenBLAS, MKL or ATLAS is present. I.e. this can also be easierly used to test whether a linking would work. This is because specifying a single library forces only one library check and has no fall-back procedure (as requested by the user!). The same applies to: NUMPY_LAPACK_ORDER=openblas,mkl,atlas This has meant that the blas_opt_info and lapack_opt_info classes in system_info.py has *completely* changed. Effectively there is only ONE change: A fall-back of LAPACK was previously using get_info('blas') to get the BLAS library to correctly link LAPACK. However, this may be undesirable when the user has OpenBLAS/BLIS/ATLAS in a BLAS only installation but wants to use the NetLIB LAPACK. Hence now lapack_opt_info uses get_info('blas_opt') which does change the fall-back routine slightly. But perhaps for an easier build? Signed-off-by: Nick Papior <nickpapior@gmail.com>
* | | BLD: streamlined library names in site.cfg sections (#13157)Nick R. Papior2019-04-302-27/+94
| |/ |/| | | * BLD: use libraries as a key consistently in all site.cfg sections
* | BUG: Adding macro HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICSRaghuveer Devulapalli2019-04-192-0/+26
| | | | | | | | | | | | | | | | | | 1) use __builtin_cpu_supports("avx512f") only for gcc ver >= 5 2) Introduced two new macro's: HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICS for ensuring compiler can compile functions that use intrinsics and are compiled with avx2/avx512f attributes
* | MAINT: fix typo in 'self'Eric Wieser2019-04-111-1/+1
| |
* | BLD: streamlined CBLAS linkage tries, default to try libraries *as-is*Nick Papior2019-04-101-20/+40
|/ | | | | | | | | | | | | | | This makes CBLAS testing a bit easier since it checks 5 cases: - user-defined libraries - cblas + user-defined libraries - blas + user-defined libraries - cblas - blas In given order. Since the has_cblas changed API it also changed name to get_cblas_libs.
* DEV: cleanup imports and some assignments (from LGTM)mattip2019-03-173-8/+7
|
* if neither libcblas or libblas is linkable, it consider libcblas is ↵Haoyu Sun2019-03-151-0/+2
| | | | inexistent, avoiding unhandled exception.
* DEP: deprecate exec_commandmattip2019-03-102-26/+28
|
* Merge pull request #13075 from rainwoodman/patch-2Charles Harris2019-03-031-4/+8
|\ | | | | Convert fortran flags from environment variable
| * Update environment.pyYu Feng2019-03-021-1/+2
| |
| * Update numpy/distutils/fcompiler/environment.pyEric Wieser2019-03-021-1/+1
| | | | | | Co-Authored-By: rainwoodman <rainwoodman@gmail.com>
| * Changes suggested by eric-wieserYu Feng2019-03-021-8/+7
| |
| * Convert fortran flags from environment variableYu Feng2019-03-021-2/+6
| | | | | | This PR fixes #13074.
* | BUG: Remove our patched version of `distutils.split_quoted`, which was a ↵Eric Wieser2019-03-021-60/+0
|/ | | | | | | | workaround for our broken `exec_command`. This was removed in gh-1217, but then added back in gh-1321. Now that we've fixed exec_command, I believe we can finally take it out for good.
* MAINT: Use with statements for opening files in distutilsEric Wieser2019-03-015-101/+80
| | | | | | Not super important, but saves some lines. Only the low-hanging ones here. Found while tracking down an unrelated ResourceWarning
* BUG: Fixes to numpy.distutils.Configuration.get_version (#13056)Eric Wieser2019-03-011-33/+22
| | | | | | | | | | | | | | | | | | | | * BUG: Use subprocess.check_output to avoid leaking file handles This emitted a ResourceWarning as previously written, as the streams never got closed. This change also detects errors in `svnversion` and `hg`, rather than ignoring the error code and hoping stdout contains a revision anyway. * BUG: Fix distutils.get_version on python 3 Previously, this would throw `TypeError: cannot use a string pattern on a bytes-like object`, which would then be silenced and never seen. The previous commit stopped silencing this error, so now everything is visibly broken rather than silently broken Changing the strings to raw strings fixes the problem * BUG: Don't use `close_fds`, which fails on windows This argument was introduced along with subprocess in f5afa7836d56640f25ff3fbd2c59b8dcf016e26f to replace `popen4`, and probably wasn't necessary in the first place.
* Merge pull request #12925 from eric-wieser/distutils-shlex-splitCharles Harris2019-02-252-5/+9
|\ | | | | BUG: parse shell escaping in extra_compile_args and extra_link_args
| * BUG: parse shell escaping in extra_compile_args and extra_link_argsEric Wieser2019-02-242-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to a change in exec_command, these strings are no longer passed onto the shell. Since config files do not support list values, our best bet is to perform shell-splitting immediately. This brings the behavior back in line a little to how it was before. On windows systems, the behavior has changed. Previously it was treated as a single argument unless it contained quotes, resulting in the following weird behavior: # passes as one argument, preserving spaces extra_link_args=-Wl,rpath=A:/path/with spaces # passes as two arguments, preserving spaces extra_link_args="-Wl,rpath=A:\path\with spaces" -lgfortran # passes as one long quoted argument (surprising and undesirable) extra_link_args=-Wl,rpath=A:\path\without_spaces -lgfortran Now it behaves as windows escaping via subprocess (but _not_ via cmd) normally would: # Passed as two separate arguments (probably not as intended, but should be expected) extra_link_args=-Wl,rpath=A:/path/with spaces # passes as two arguments, preserving spaces extra_link_args="-Wl,rpath=A:\path\with spaces" -lgfortran # passes as two arguments extra_link_args=-Wl,rpath=A:\path\without_spaces -lgfortran Fixes gh-12659
* | BUG: Fix regression in parsing of F90 and F77 environment variablesEric Wieser2019-02-241-4/+4
| | | | | | | | | | | | Fixes gh-12979 Among other things, this means setting the `F90` environment variable to `"path to/f90" --coverage` works again.
* | Merge pull request #13023 from eric-wieser/distutils-windows-splitCharles Harris2019-02-242-0/+170
|\ \ | |/ | | BUG: Changes to string-to-shell parsing behavior broke paths with quotes
| * MAINT: Add functions to parse shell-strings in the platform-native wayEric Wieser2019-02-232-0/+170
| | | | | | | | | | | | | | | | | | | | There are places in distutils where we accept a single string from the user, and interpret it as a set of command line arguments. Previously, these were passed on as a string unmodified to exec_command, and interpreted by subprocess in a platform-specific way. Recent changes to distutils now pass a list of arguments to subprocess, meaning we have to split the strings ourselves. While `shlex.split` is perfect on posix systems, it is not a good approximation of either the old or the expected behavior on windows. Provides the building blocks needed to fix gh-12979
* | Merge pull request #12831 from petronny/patch-1Matti Picus2019-02-221-1/+1
|\ \ | | | | | | BUG: do not catch stderr when checking compiler version
| * | also match the stderr in get_version()Jingbei Li2019-01-231-1/+1
| | | | | | | | | which used to fail for ifort
* | | Merge pull request #12894 from eric-wieser/distutils-broken-importMarten van Kerkwijk2019-02-031-1/+0
|\ \ \ | | | | | | | | MAINT: Removed unused and confusingly indirect imports from mingw32ccompiler
| * | | MAINT: Removed unused and confusingly indirect imports from mingw32ccompilerEric Wieser2019-01-301-1/+0
| | | | | | | | | | | | | | | | Both of these functions are better exposed through `distutils.ccompiler`, but neither are used anyway
* | | | Merge pull request #12895 from eric-wieser/distutils-extra-quotes-againCharles Harris2019-01-311-4/+15
|\ \ \ \ | | |_|/ | |/| | BUG: Do not insert extra double quote into preprocessor macros
| * | | BUG: Do not insert extra double quote into preprocessor macrosEric Wieser2019-01-301-4/+15
| |/ / | | | | | | | | | | | | | | | | | | | | | These are not used by our code, but it's possible downstream users are using them - without this patch, they would get a syntax error in their C code. This also correctly handles version strings that contain embedded quotes, although probably still fails on non-ascii data. Fixes gh-12893, on the probably correct assumption it was broken in the first place.
* | | Merge pull request #12892 from eric-wieser/distutils-debugCharles Harris2019-01-315-5/+11
|\ \ \ | | | | | | | | BUG: Do not double-quote arguments passed on to the linker
| * | | BUG: Do not double-quote arguments passed on to the linkerEric Wieser2019-01-305-5/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the recent patch to CCompiler.spawn, the file-paths no longer need manual quoting - that's handled as needed within subprocess. This also states our assumption that our paths do not contain commas. If we care about this, we could adopt the approach used by https://github.com/rust-lang/rust/issues/38795. Tested for gcc locally by looking at the error messages of `subprocess.check_call(["gcc", r'-Wl,spaces and no quotes'])` Other fortran compiler changes not tested, but assumed to be broken in the same way. Fixes #12882
* | | BUG: fix to check before apply `shlex.split`OBATA Akio2019-01-221-5/+5
| |/ |/| | | | | | | | | | | `shlex.split` will try to read stdin if `None` is passed, so change to check before apply it. see #12823
* | Merge pull request #12631 from acastanedam/f2py_pgiCharles Harris2019-01-191-1/+5
|\ \ | | | | | | BUG: fix f2py problem to build wrappers using PGI's Fortran
| * | BUG: fix f2py problem to build wrappers using PGI's FortranArcesio Castaneda Medina2018-12-301-1/+5
| | |
* | | TST: suppress test warnings for appending flag behavior better.Ralf Gommers2018-12-271-3/+8
| | |
* | | MAINT: add warning to numpy.distutils for LDFLAGS append behavior.Ralf Gommers2018-12-272-4/+47
|/ / | | | | | | See gh-7427
* | BUG: ensure new-lines in compiler error messages are actually printed to the ↵Eric Wieser2018-12-092-6/+29
| | | | | | | | | | | | console Previously this would show `b'first_line\nsecond_line'`
* | MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-066-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* | Merge pull request #12443 from rth/set-litteralEric Wieser2018-12-011-2/+2
|\ \ | | | | | | MAINT Use set litterals