summaryrefslogtreecommitdiff
path: root/numpy/distutils/system_info.py
Commit message (Collapse)AuthorAgeFilesLines
* ENH: Allow site.cfg information with libraries keyNick Papior2016-01-171-1/+4
| | | | | | | | | | This PR fixes the case when users create a site.cfg to fix library locations, but does not change the library names. Now numpy.distutils correctly checks all options related to libraries by defaulting to the library from the class via _lib_names Signed-off-by: Nick Papior <nickpapior@gmail.com>
* BUG: skip invalid path distutils warning for empty stringsJulian Taylor2016-01-131-1/+1
| | | | | empty strings are the default for the new rpath, extra_compile_args and extra_link_args sections
* MAINT: Remove commented out code blocksgfyoung2015-12-201-30/+0
|
* DOC: Use print only as function when print_function is imported from __future__gfyoung2015-12-191-1/+1
| | | | Closes gh-6863.
* BUG: link cblas library if cblas is detectedAllan Haldane2015-12-041-11/+38
|
* BUG: Readd fallback CBLAS detection on linux.Charles Harris2015-11-251-1/+29
| | | | | | | | | | Fallback CBLAS detection was removed in gh-6183 because it led to problems on windows when mingw was used with python compiled with msvc but msvc was not installed. As a result of that fix, CBLAS detection failed for some Linux installations. The solution here is to add back the fallback detection but make it specific to non-windows platforms. Closes #6675.
* MAINT: Dictionary litteralRémy Léone2015-11-071-9/+7
|
* BLD: mingwpy fixescarlkl2015-09-241-18/+0
|
* Merge pull request #6243 from dzagorny/intel-distutils-fixesCharles Harris2015-09-221-2/+2
|\ | | | | BLD: Intel distutils fixes
| * MSVCCompiler overwrite 'lib' and 'include' environment variables. ThisDmitry Zagorny2015-09-151-2/+2
| | | | | | | | | | | | | | | | | | behavior affect at least python 3.5 and SciPy build and build failed. During initialization <python>.distutils.MSVCCompiler replace Intel environment('include' and 'lib' paths). This fix decorate 'initialize' function in MSVCCompiler and extend 'lib' and 'include' environment variables. Changed compilation keys: generate optimized code specialized for Intel processors with SSE4.2 support.
* | ENH: enabled extra_link_args in OpenBLAS segmentNick Papior2015-09-171-2/+13
|/ | | | | | | | | | | | | The extra_link_args is sadly not intrinsically used for many parts of the system_info code. This commit adds the linking properties stored when using extra_link_args in the openblas section to bypass any difficulties in the usage of OpenBLAS. This is especially helpful when linking against external LAPACK libraries which requires -lgfortran and possibly -lm for correct linking.
* BLD: Remove fallback CBLAS detection looking for cblas.h.Charles Harris2015-08-081-26/+1
| | | | | | | | This raises DistutilsPlatformError when mingw32 is used as the default ccompiler is msvc. That is fixable, but does not seem worth the trouble as looking for a cblas.h file for a last effort to detect cblas seems a bit fragile in any case. I think it is better handled elsewhere on a case by case basis in combination with site.cfg.
* Merge pull request #5597 from zerothi/ENH-distutilsCharles Harris2015-04-241-1/+47
|\ | | | | BLD, ENH: Reading of extra flags from site.cfg to extend flexibility
| * BUG: Had thought the defaults where made of lists, it is simply a str.Nick Papior Andersen2015-02-261-3/+3
| | | | | | | | Changed all lists to strings
| * ENH: rpath and runtime_library_dirs equivalentNick Papior Andersen2015-02-261-1/+6
| | | | | | | | | | | | | | | | | | 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.
| * BUG: PEP correctionsNick Papior Andersen2015-02-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
| * BUG: PEP corrections and streamlined with numpy dev lineNick Papior Andersen2015-02-251-2/+2
| | | | | | | | | | | | | | | | | | Changed self.assert* to assert_ instances through numpys own testing utilities. Fixes for the rst document. Removed unnecessary import statements in the test.
| * BLD, ENH: Reading of extra flags from site.cfg to extend flexibilityNick Papior Andersen2015-02-231-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | BLD: Improve mingw-w64 detection of check_embedded_lapack.carlkl2015-02-271-0/+17
|/
* Merge pull request #5364 from charris/detect_atlas_3_10Charles Harris2014-12-241-3/+80
|\ | | | | ENH: Add support for ATLAS > 3.9.33.
| * ENH: Add support for ATLAS > 3.9.33.Charles Harris2014-12-241-3/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent ATLAS combines the previous libraries into two * libsatlas -- single threaded. * libtatlas -- threaded. This fix is a bit of hack in that ATLAS > 3.9.33 is treated as a new, separate library covered by atlas_3_10_info, but the latter derived from atlas_info, which treats the cblas, atlas, and atlas_lapack libraries separately, so the new info has a bit of repetition. The alternative would be to rewrite atlas_info, but that can wait on a larger cleanup of the build system. Closes #3774.
* | BLD: check for CBLAS header in "unoptimized" blasJulian Taylor2014-09-041-1/+25
| | | | | | | | | | Allows building against system installed blas library that might be optimized.
* | ENH: Add 'HAVE_CBLAS' macro for build purposes.Charles Harris2014-09-041-6/+11
|/ | | | | | | | The current system works for MKL and OpenBLAS by default because the mkl_info and openblas_info classes in numpy/distutils/system_info do not define the macro 'NO_ATLAS_INFO=1' that currently signals the absence of CBLAS. This PR declares the presence of CBLAS directly by defining the 'HAVE_CBLAS' macro.
* BUG: check if openblas embeds lapackJulian Taylor2014-05-221-1/+47
| | | | | | | | add openblas_lapack info which checks if it embedds lapack so lapack_info will point to openblas the normal openblas info does not check so it may or may not embed lapack. closes gh-4192
* BUG: don't set a default for libraries configuration keyJulian Taylor2014-05-221-1/+0
| | | | | | the get_libs function assumes there is no default to return the default it was asked to return in that case. Closes gh-4607
* ENH: Make output of get_atlas_info conditional on system_info.verbosityArnaud Bergeron2014-02-271-6/+5
|
* BUG: get_info('openblas') does not read libraries keyJulian Taylor2014-02-211-2/+4
| | | | | | | | | The documented libraries tag in the site.cfg is not read by the configuration, instead openblas_libs is used, this is inconsistent with atlas configuration. So libraries first and then try openblas_libs for backward compatibility. Also ensure check_libs returns None instead of a dict of empty lists if nothing is found.
* cross-platform code to find numpy configbbudescu2013-11-071-1/+1
| | | | https://github.com/numpy/numpy/issues/3995
* Do not fail with NameError if SandboxViolation is raisedJason Madden2013-09-281-1/+3
|
* Fix platform detection for intel platform where get_platform() returns a ↵Alex Barth2013-09-281-0/+2
| | | | string ending in x86_64, for instance 'macosx-10.8-x86_64'.
* Make vecLib / Accelerate not shadow other optimized builds under OSXOlivier Grisel2013-09-041-23/+33
|
* Add support for using openblas for the _dotblas function.Ake Sandgren2013-08-201-1/+23
|
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-1/+1
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* BLD: fix setuptools-specific easy_install issue. Closes gh-3160.Ralf Gommers2013-05-191-2/+4
| | | | | | | | An error is raised by setuptools when trying to write to /dev/null. Was fixed in distribute, but not in setuptools. No multi-arch support with plain setuptools should be OK, because multi-arch is Ubuntu specific (at least for now), and they ship distribute.
* Merge pull request #3205 from charris/2to3-apply-dict-fixerCharles Harris2013-04-071-1/+1
|\ | | | | 2to3: apply `dict` fixer.
| * 2to3: apply `dict` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python3 `dict.items()`, `dict.keys()`, and `dict.values()` are iterators. This causes problems when a list is needed so the 2to3 fixer explicitly constructs a list when is finds on of those functions. However, that is usually not necessary, so a lot of the work here has been cleaning up those places where the fix is not needed. The big exception to that is the `numpy/f2py/crackfortran.py` file. The code there makes extensive use of loops that modify the contents of the dictionary being looped through, which raises an error. That together with the obscurity of the code in that file made it safest to let the `dict` fixer do its worst. Closes #3050.
* | Merge pull request #3202 from charris/2to3-reduce-fixupsnjsmith2013-04-071-2/+1
|\ \ | |/ |/| MAINT: Cleanup some imports involving reduce.
| * MAINT: Cleanup some imports involving reduce.Charles Harris2013-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | Because reduce has been available in functools since Python 2.6 we can get rid of the version checks we currently have before we import it. Also removes some reduce related skips in tools/py3tool.py. We were already skipping the reduce fixer so this has no effect other than cleaning up the code.
* | 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
|/ | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Apply `imports` fixer.Charles Harris2013-04-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `imports` fixer deals with the standard packages that have been renamed, removed, or methods that have moved. cPickle -- removed, use pickle commands -- removed, getoutput, getstatusoutput moved to subprocess urlparse -- removed, urlparse moved to urllib.parse cStringIO -- removed, use StringIO or io.StringIO copy_reg -- renamed copyreg _winreg -- renamed winreg ConfigParser -- renamed configparser __builtin__ -- renamed builtins In the case of `cPickle`, it is imported as `pickle` when python < 3 and performance may be a consideration, but otherwise plain old `pickle` is used. Dealing with `StringIO` is a bit tricky. There is an `io.StringIO` function in the `io` module, available since Python 2.6, but it expects unicode whereas `StringIO.StringIO` expects ascii. The Python 3 equivalent is then `io.BytesIO`. What I have done here is used BytesIO for anything that is emulating a file for testing purposes. That is more explicit than using a redefined StringIO as was done before we dropped support for Python 2.4 and 2.5. Closes #3180.
* 2to3: Use absolute imports.Charles Harris2013-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Remove xreadlines and replace f.readlines() by f where valid.Charles Harris2013-03-051-1/+1
| | | | | | | | | | An open file `f` has been an iterator since python2.3 and `f.xreadlines()` is no longer needed, so replace it with `f`. Also replace `f.readlines()` with `f` where an iterator will do. The replacement of `f.readlines()` is not critical because it is a list in both python2 and python3, but the code is a bit cleaner. Closes #3093
* MAINT: Get rid of a ResourceWarning.Charles Harris2013-03-031-1/+6
| | | | | This one in numpy/distutils/system_info.py. Just keep an explicit reference to a file, then close it.
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+2
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* REF: Replace filters with list comprehensions.Charles Harris2013-02-281-3/+3
| | | | | | 2to3 does a lot of list(filter(...)) sort of thing which can be avoided by using list comprehensions instead of filters. This also seems to clarify the code to a considerable degree.
* 2to3: Apply `filter` fixes. Closes #3053.Charles Harris2013-02-281-3/+3
| | | | | Generally, this involves using list comprehension, or explicit list construction as `filter` is an iterator in Python 3.
* 2to3: Use modern exception syntax.Charles Harris2013-02-261-1/+1
| | | | Example: except ValueError,msg: -> except ValueError as msg:
* FIX: Add multiarch paths to the distutils' onesOndřej Čertík2012-12-131-0/+13
| | | | | | | | | | Thanks to Julian Taylor and Sandro Tosi from Debian for the original patch. Ralf has posted a link to the patch here: http://article.gmane.org/gmane.comp.python.numeric.general/51454 I have modified the patch to remove the bare except command only catch the OSError. Also I suppress the stderr.
* add platform specific python include directories to search pathsJulian Taylor2012-12-051-2/+8
| | | | the generic and platform specific path diverge in python3.3 in ubuntu 13.04
* Fix numpy.distutils to find atlas BLAS on UbuntuNathaniel J. Smith2012-05-201-3/+10
| | | | | | | | | | | | | As per discussion here: http://mail.scipy.org/pipermail/numpy-discussion/2012-May/062363.html numpy.distutils was failing to find BLAS on my Ubuntu 11.04 system. The problem is that _check_libs looks for libraries in several directories, and it turns out that the "atlas" library was found in both /usr/lib64/atlas-base *and* in /usr/lib64, which confused _check_libs into thinking that it couldn't be found at all. With this fix, scipy now builds against numpy master for me.