summaryrefslogtreecommitdiff
path: root/numpy/distutils
Commit message (Collapse)AuthorAgeFilesLines
* BUG: ifort has issues with optimization flag /O2cgohlke2014-04-091-1/+1
| | | | Fixes scipy test failures.
* ENH: Make output of get_atlas_info conditional on system_info.verbosityArnaud Bergeron2014-03-183-9/+9
|
* BUG: get_info('openblas') does not read libraries keyJulian Taylor2014-02-271-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.
* Detect vendor versions of GNU CompilersAron Ahmadia2014-02-151-3/+3
| | | | | | | | Cray and other HPC vendors provide patched versions of the GNU compilers with modified version strings. Use re.search instead of re.match in the version detection scripts to account for modified version strings. Ref: https://github.com/numpy/numpy/issues/4259
* Merge pull request #3824 from charris/backport-1.8-3821Charles Harris2013-09-281-1/+3
|\ | | | | Backport 1.8 3821
| * 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'.
* ENH: Add build support for openblas.Charles Harris2013-09-051-19/+51
| | | | Backport of gh-3642 and gh-3688.
* STY: Giant comma spacing fixup.Charles Harris2013-08-1852-642/+642
| | | | | | | 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.
* STY: Giant whitespace cleanup.Charles Harris2013-08-184-5/+5
| | | | Now is as good a time as any with open PR's at a low.
* STY: Break long lines in numpy/distutils/log.py.Charles Harris2013-07-291-5/+16
|
* MAINT: typo fix in logging messageTomas Tomecek2013-07-291-2/+2
| | | | | The logging message in numpy.distutils.log.set_threshold mispelled threshold.
* BUG: Handle a version string from a custom-built mingw64.mwtoews2013-05-292-1/+2
| | | | | | | | The custom build compiler "GNU Fortran (rubenvb-4.8.0) 4.8.0" was incorrectly parsed as version '-4.8.0' and the flag "-mno-cygwin" was added to the compilation. See http://cens.ioc.ee/pipermail/f2py-users/2010-October/002092.html.
* MAINT: Remove msvc_on_amd64 functionChristoph Gohlke2013-05-222-15/+1
| | | | This function is no longer required for building with msvc on AMD64
* 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.
* ENH: add possibility to add define_macros to extensionsJulian Taylor2013-05-091-1/+19
|
* Merge pull request #3182 from juliantaylor/debug-extRalf Gommers2013-05-052-6/+40
|\ | | | | get_shared_lib_extension(): strip debug extension from so ext
| * BUG: hardcode some known shared library extensionsJulian Taylor2013-04-282-6/+40
| | | | | | | | | | | | | | | | the configuration variables are not a reliable mean to get the shared library extension. darwin, windows and debug linux are wrong in these variables. SHLIB_SUFFIX is also wrong as of python 3.3.1 closes #3057
* | Merge pull request #3261 from keflavich/f77_ext_bugfixCharles Harris2013-05-021-2/+2
|\ \ | | | | | | bugfix in build_ext: check that ext has an attribute before trying to us it
| * | reduces excess cleverness from 1/2 to 1/3Adam Ginsburg2013-04-211-2/+2
| | |
| * | bugfix in build_ext: check that ext has an attribute before trying toAdam Ginsburg2013-04-181-2/+2
| | | | | | | | | | | | use it
* | | MAINT: Apply 2to3 idioms fixer.Charles Harris2013-05-025-8/+7
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idioms fixer makes the following replacements. 1) int <- bool 2) comparison or identity of types <- isinstance 3) a.sort() <- sorted(a) There were two problems that needed to be dealt with after the application of the fixer. First, the replacement of comparison or identity of types by isinstance was not always correct. The isinstance function returns true for subtypes whereas many of the places where the fixer made a substitution needed to check for exact type equality. Second, the sorted function was applied to arrays, but because it treats them as iterators and constructs a sorted list from the result, that is the wrong thing to do. Closes #3062.
* | ENH: remove obsolete ifort flags, ensure generated binaries work everywhere.David Cournapeau2013-04-231-14/+5
|/
* 2to3: Apply basestring fixer.Charles Harris2013-04-131-3/+6
| | | | | | | | | | | The basestring class is not defined in Python 3 and the fixer replaces it with str. In order to have a common code base we define basestring in numpy/compat/py3k.py to be str when the Python version is >= 3, otherwise basestring and import it where needed. That works for most cases, but there are a few files where the version dependent define needs to be in the file. Closes #3042.
* 2to3: Apply `repr` fixer.Charles Harris2013-04-081-2/+2
| | | | | | | | | | | | This replaces python backtics with repr(...). The backtics were mostly used to generate strings for printing with a string format and it is tempting to replace `'%s' % repr(x)` with `'%r' % x`. That would work except where `x` happened to be a tuple or a dictionary but, because it would be significant work to guarantee that and because there are not many places where backtics are used, the safe path is to let the repr replacements stand. Closes #3083.
* Merge pull request #3205 from charris/2to3-apply-dict-fixerCharles Harris2013-04-078-10/+10
|\ | | | | 2to3: apply `dict` fixer.
| * MAINT: Fixup more dictionary fixer fixes.Charles Harris2013-04-072-4/+4
| | | | | | | | | | | | Most of these are places where an iterator will work as well as a list, but two fix places where `iterkeys` was introduced which is a bug.
| * 2to3: apply `dict` fixer.Charles Harris2013-04-069-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0680-112/+111
|/ | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* Merge pull request #3191 from charris/2to3-apply-imports-fixerCharles Harris2013-04-066-21/+37
|\ | | | | 2to3: Apply `imports` fixer.
| * 2to3: Apply `imports` fixer.Charles Harris2013-04-026-21/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #460 from endolith/regex_formattingCharles Harris2013-04-033-34/+37
|\ \ | |/ |/| DOC: Formatting fixes using regex
| * DOC: Used regex to find colons missing spaces which render wrong online, ↵endolith2013-03-193-34/+37
| | | | | | | | also other spacing or formatting mistakes
* | Merge pull request #3178 from charris/2to3-apply-import-fixernjsmith2013-04-0273-83/+85
|\ \ | | | | | | 2to3 apply import fixer
| * | 2to3: Add `from __future__ import ...` to some files that were missed.Charles Harris2013-03-281-0/+2
| | | | | | | | | | | | | | | | | | | | | With the exception of numpy/distutils/tests/test_exec_command.py, all of these files are script files in tools/osxbuild and tools/win32build. The import in the script files omits `absolute_import` as they are not part of a package.
| * | 2to3: Use absolute imports.Charles Harris2013-03-2872-83/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | MAINT: Fix python3 ResourceWarning when running test_exec_command.pyCharles Harris2013-03-281-0/+4
|/ / | | | | | | | | | | The tests in test_exec_command.py used with blocks with a context manager that could redirect stderr and stdout to temporary files but those files were not closed on exit from the block.
* | 2to3: Replace xrange by range and use list(range(...)) where neededCharles Harris2013-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In python3 range is an iterator and `xrange` has been removed. This has two consequence for code: 1) Where a list is needed `list(range(...))` must be used. 2) `xrange` must be replaced by `range` Both of these changes also work in python2 and this patch makes both. There are three places fixed that do not need it, but I left them in so that the result would be `xrange` clean. Closes #3092
* | TST: open the TemporaryFile in ASCII modeOndrej Certik2013-03-251-1/+1
| | | | | | | | | | | | | | This should fix gh-3165. Conflicts: numpy/distutils/tests/test_exec_command.py
* | TST: skip general test on non-posix platformsOndrej Certik2013-03-101-10/+15
| | | | | | | | Add a comment explaining the issue.
* | TST: Redirect the other stream to temp. fileOndrej Certik2013-03-101-6/+11
| | | | | | | | | | | | | | Now things behave the same if executed with either of: nosetests nosetests -s
* | Implement separate checking for stdout and stderrOndrej Certik2013-03-092-15/+14
| | | | | | | | And enable a test for this that was failing before.
* | TST: add robust tests for exec_command()Ondrej Certik2013-03-091-1/+44
| | | | | | | | | | | | | | | | | | First, we test both stdout and stderr. Second, we now test both _exec_command_posix() and _exec_command(), see numpy/distutils/exec_command.py. This reveals a bug in the implementation which will be fixed in the next commit. For now the failing test is commented out so that all tests still pass.
* | PEP8: don't use \Ondrej Certik2013-03-071-2/+2
| |
* | FIX: add _supports_fileno() for testing fileno()Ondrej Certik2013-03-071-2/+15
| | | | | | | | | | | | The new _supports_fileno() function works in all versions of Python. The problem was that in Python 2.x, the fileno() method of StringIO() is missing, while in Python 3.x, it is present, but raises an exception.
* | BUG: fix issue with distutils.exec_command introduced in 1.7.0.Ralf Gommers2013-03-062-16/+55
|/ | | | | | | | Closes gh-2999 and gh-2915. There are several packages (nose, scipy.weave.inline, Sage inline Fortran) that replace stdout, in which case it doesn't have a fileno method. This method was attempted to be used (change in gh-2766 to fix a py3k issue).
* 2to3: Remove xreadlines and replace f.readlines() by f where valid.Charles Harris2013-03-058-14/+11
| | | | | | | | | | 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
* 2to3:DEP: Remove interactive setup and gnu compiler configuration.Charles Harris2013-03-053-208/+2
| | | | | | | | | | | | | | | | | | | | | | These havn't been deprecated, but I think few have heard of them, much less used them. Before this change, running setup.py without any arguments would result in interactive help. This patch removes that interactive help and lets setup print its usual list of commands and options. All the script uses of the numpy/distutils/fcompiler compilers look quite broken to me, but I have tried to maintain compatibility with the earlier version of gnu.py after the removal of `raw_input`. These removals solve an incompatibility between Python3 and Python2. The current interactive setup help uses `raw_input`, which has been removed in python3 and replaced by `input`. However, python2 already has an `input` that has different semantics. Rather than deal with this, I think it simpler to keep both `raw_input` and `input` out of numpy. Closes #3063 Closes #3079