summaryrefslogtreecommitdiff
path: root/numpy/distutils/system_info.py
Commit message (Collapse)AuthorAgeFilesLines
...
* DOC: update or remove outdated sourceforge linksmattip2019-08-081-1/+1
|
* MAINT: Remove unreachable `break` from `get_cblas_libs` (#14022)Disconnect3d2019-07-151-2/+0
|
* MAINT: Use textwrap.dedent for multiline stringsEric Wieser2019-06-121-41/+45
| | | | | | This makes it easier to visually jump between functions. A couple places have changed to not emit leading whitespace where they previously did. Since this is C code and not fortran, that doesn't matter.
* MAINT: Use a with statement instead of try / finallyEric Wieser2019-06-041-20/+15
| | | | All of this code was already correct, this just tidies it a little
* Merge pull request #13158 from zerothi/linalg-flameRalf Gommers2019-05-241-1/+93
|\ | | | | BLD: Add libflame as a LAPACK back-end
| * MAINT: amended fixes suggested in #13158Nick Papior2019-05-231-3/+0
| | | | | | | | Signed-off-by: Nick Papior <nickpapior@gmail.com>
| * BLD: added libflame as a useable lapack libraryNick Papior2019-05-071-1/+96
| | | | | | | | | | | | | | Now libflame may be used as a LAPACK back-end. libflame requires an external BLAS so one has to also have this enabled. Also added release notes for NPY_*_ORDER and libFLAME.
* | BUG: distutils/system_info.py fix missing subprocess import (#13523)denniszollo2019-05-191-2/+3
|/ | | | | | * distutils/system_info.py fix missing subprocess import * Update system_info.py
* 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-301-25/+72
| | | | | | * BLD: use libraries as a key consistently in all site.cfg sections
* | 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-171-4/+3
|
* if neither libcblas or libblas is linkable, it consider libcblas is ↵Haoyu Sun2019-03-151-0/+2
| | | | inexistent, avoiding unhandled exception.
* Merge pull request #12925 from eric-wieser/distutils-shlex-splitCharles Harris2019-02-251-1/+3
|\ | | | | 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-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | 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.
* | MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-061-5/+6
|/ | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* MAINT: remove unused stdlib importsEmil Hessman2018-09-301-1/+0
|
* MAINT: remove exec_command from system_info.pyTyler Reddy2018-09-101-3/+8
| | | | | | * replace exec_command() with its standard library equivalent in distutils system_info module
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-161-3/+3
|
* MAINT: distutils.system_info: handle Accelerate like any other libraryPauli Virtanen2018-05-081-70/+61
| | | | | | | | | | | | Remove the special-cased handling of OSX Accelerate/vecLib libraries, and move the code (which was duplicated in two places) to a new accelerate_info class, which is used in the same way as openblas/etc libs. Also add a configuration section and an environment variable for controlling whether Accelerate/vecLib is to be used or not. Previously, it was not possible to use generic BLAS/LAPACK instead of Accelerate on OSX.
* Add missing underscore to prototype in check_embedded_lapackMalcolm Smith2018-04-161-1/+1
|
* BLD: Add configuration to allow cross platform builds for iOS.Russell Keith-Magee2018-03-041-8/+12
| | | | | | | | When building NumPy for iOS, you build on macOS, with compiler flags to target iOS or the iOS simulator. However, setup.py runs on macOS, so sys.platform == 'darwin', regardless of the platform being targetted. distutils provides an environment variable - _PYTHON_HOST_PLATFORM - to indicate when you are building for a different platform. This patches uses that variable to identify cross-platform builds and disable macOS specific features. The patch also renames an internal method in strfuncs to avoid a collision with a symbol in iOS's standard library, and includes math.h to avoid errors about undefined symbols.
* BUG: distutils: prefix library namexoviat2017-12-171-0/+2
| | | | | | | | | | In linux and particulary MinGW on windows, library names may be prefixed with "lib." However, if the library name is prefixed with "lib" on MSVC or ABI-equivalent (clang/intel), the prefix should not be excluded from the library name. This caused system_info to find "libopenblas" or "libsuitesparse" but then add "openblas" to the library names, which is of course problematic because MSVC would not look for "libopenblas" but rather "openblas."
* ENH: distutils: improve windows autoconfigurationxoviat2017-11-221-11/+40
| | | | | Autoconfigure libraries and headers when conda is detected on the path. Also support copenblas and clapack when found.
* MAINT: distutils: trivial cleanupsxoviat2017-11-061-8/+5
|
* MAINT: make vcpkg include directories more clearxoviat2017-10-141-3/+13
|
* BLD: distutils: auto-find vcpkg include and library directoriesxoviat2017-10-111-0/+18
|
* distutils: system_info: fixupxoviat2017-09-021-2/+2
|
* distutils: handle unlinkable object files in build_clib/build_ext, not gnuPauli Virtanen2017-09-021-65/+55
| | | | | | | | | | | | | | | | | | | | | | Add concept of unlinkable Fortran object files on the level of build_clib/build_ext. Make build_clib generate fake static libs when unlinkable object files are present, postponing the actual linkage to build_ext. This enables MSVC+gfortran DLL chaining to only involve those DLLs that are actually necessary for each .pyd file, rather than linking everything in to every file. Linking everything to everywhere has issues due to potential symbol clashes and the fact that library build order is unspecified. Record shared_libs on disk instead of in system_info. This is necessary for partial builds -- it is not guaranteed the compiler is actually called for all of the DLL files. Remove magic from openblas msvc detection. That this worked previously relied on the side effect that the generated openblas DLL would be added to shared_libs, and then being linked to all generated outputs.
* distutils: gnu: patch fcompilexoviat2017-09-021-0/+65
| | | | | | | | | | This allows mingw's gfortran to work with MSVC. DLLs are autogenerated using heuristics that should work with most cases. In addition, a libopenblas DLL is compiled from the static lib for use with MSVC. All generated DLLs have randomized names so that no clashes will occur.
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-1/+1
| | | | Bare except is very rarely the right thing
* BUG: blas_info should record include_dirsBenda Xu2017-02-151-0/+2
| | | | | blas specified in site.cfg could have non-standard include dirs. It should be read and saved in distutils/__config__.py
* BUG: do not link to Accelerate if OpenBLAS, MKL or BLIS are found.Ralf Gommers2016-11-241-2/+4
| | | | Closes gh-8293.
* MAINT: change path to env in distutils.system_info. Closes gh-8195.Ralf Gommers2016-10-221-7/+5
| | | | Also clean up some unused variables.
* ENH: Add stacklevel to all (or almost all) our function callsSebastian Berg2016-09-021-13/+13
|
* MAINT: Close some filehandlers and PIPEs after being doneSebastian Berg2016-09-021-5/+6
| | | | | The PIPE in the tests caused a ResourceWarning during testing in python 3.
* Fixed MKL detection for recent versions of this library.Xavier Abellan Ecija2016-08-051-19/+3
|
* BLD: preserve library orderMike Nolta2016-06-251-45/+35
| | | | | | Before, the list of libraries was resorted to match the order of library_dirs. Now, the opposite occurs: library_dirs is resorted to match the library order.
* Change mkl_info.dir_env_var from MKL to MKLROOTRay Donnelly2016-06-101-1/+1
| | | | Reference: https://software.intel.com/en-us/node/528500
* BLD: correct C compiler customization in system_info.py Closes gh-7606.Ralf Gommers2016-05-141-3/+5
|
* BLD: fix configparser.InterpolationSyntaxErrorSorin Sbarnea2016-04-281-2/+8
| | | | Closes #7572 inability to install in virtualenvs with percent in their path.