summaryrefslogtreecommitdiff
path: root/numpy/distutils/ccompiler.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC: fix minor typosUnknown2017-12-121-1/+1
|
* BUG: Fix Intel compilation on Unix.Charles Harris2017-06-261-0/+20
| | | | | | | | | | | Fixes two problems: * c compilers do not have a find_executables method. * get_version return a LooseVersion instance, not string. Closes #9278. [ci skip]
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-1/+1
| | | | Bare except is very rarely the right thing
* BUG: distutils, add compatiblity python parallelizationJulian Taylor2017-05-041-3/+44
| | | | | | | | | | | | | | | | | | | | Python 3.5 also added build parallelization at the extension level instead of the file leve numpy uses. This causes two problems: - numpy.distutils is not threadsafe with duplicated source files When source files are duplicated in multiple extensions the output objects are overwritten which can truncate in a parallel context. This is fixed by keeping track of the files being worked on and wait for completion if another thread is already using the object name. - The parallelization on two nested levels causes oversubscription. When building multiple extensions with multiple source files the number of jobs running is multiplied. This is fixed by adding a semaphore that limits the number of jobs numpy starts to the defined amount. closes gh-7139
* BUG: check compiler flags to determine the need for a rebuildJulian Taylor2017-05-021-5/+17
| | | | | | | Some projects compile an extension multiple times with different flags. As it is not intended to get the extension name from the compiler object, store the last used flags in the dependency file and also check if they match the flags of the current build.
* ENH: automatically determine compile dependenciesJulian Taylor2017-04-101-2/+66
| | | | | Use these dependencies to avoid unnecessary recompilations of unchanged files.
* Monkey-patch _msvccompile.gen_lib_option like any other compilatorsValentin Valls2016-08-101-1/+1
| | | | | | | `setuptools` is now using `_msvccompile` instead of `msvccompile9`. numpy is monkey-patching symmetrically `gen_lib_options` and `spawn` function for all compilators. But `_msvccompile.gen_lib_options` was not monkey-patched while `_msvccompile.spawn` is already monkey-patched throug the super class `ccompiler.spawn`. This patch only symmetrically patch `_msvccompile` to prevent param file quoting.
* MAINT: Resolve import naming collision and optimize importsFrancis T. O'Donovan2015-12-121-5/+3
|
* BUG: fix AttributeError in numpy/distutils.Ryan Grout2015-10-191-2/+3
| | | | Corrects an AttributeError on windows in some cases caused by #6185
* LIBPATH with spaces is now supported Python 2.7+ and Win32Gabi Davar2015-10-161-2/+2
|
* Distutils doesn't warn unless compiler_cxx is emptyPeter Iannucci2015-08-101-1/+1
| | | Warns on OS X with MacPorts Python because it doesn't recognize clang. There isn't actually a problem, though, as distutils.sysconfig has done its job just fine. Proposed fix.
* BUG: distutils: fix a typo in 64-bit Intel compiler for Windows support.Ralf Gommers2015-05-061-1/+1
| | | | Snuck in in gh-5694.
* ENH: distutils: add compiler classes for Intel compilers + MSVC-built Python.Ralf Gommers2015-03-191-3/+11
| | | | Thanks to Intel for contributing this patch. Contact: Yolanda Chen.
* ENH: support parallel compilation of extensionsJulian Taylor2014-10-281-8/+34
| | | | | | | | | | | | | | Allow extensions using numpy.distutils to compile in parallel. By passing `--jobs=n` or `-j n` to `setup.py build` the compilation of extensions is now performed in `n` parallel processes. Additionally the environment variable NPY_NUM_BUILD_JOBS is used as the default value, if its unset the default is serial compilation. The parallelization is limited to within the files of an extension, so only numpy multiarraymodule really profits but its still a nice improvement when you have 2-4 cores. Unfortunately Cython will not profit at all as it tends to build one module per file.
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-30/+30
| | | | | | | 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.
* MAINT: Remove msvc_on_amd64 functionChristoph Gohlke2013-05-221-4/+1
| | | | This function is no longer required for building with msvc on AMD64
* MAINT: Apply 2to3 idioms fixer.Charles Harris2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | 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.
* 2to3: apply `dict` fixer.Charles Harris2013-04-061-2/+2
| | | | | | | | | | | | | | | 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.
* 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: 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: 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.
* BLD: fix build for py3k + pip. Closes #1857. Thanks to Erik Bray.Ralf Gommers2011-08-131-1/+5
| | | | Also works inside a virtualenv.
* ENH: add Intel 64-bit C compiler. Closes #960.rgommers2011-03-111-0/+3
|
* STY: clean up unused code. Closes #1409. Thanks to Bruce Southey.rgommers2011-01-241-13/+1
|
* ENH: add support for the PathScale compilers on Linux. Closes #1043.rgommers2010-12-021-1/+5
| | | | Thanks to R. Perez.
* Fix version matcher for cases where version string appears in second line ↵Pearu Peterson2010-03-171-0/+3
| | | | (Intel Visual Compiler, IA-32, Version 11.1)
* ENH: Support changed distutils API in Python 2.7.Stefan van der Walt2010-02-241-1/+5
|
* Py3k: handle relative import in ccompiler.David Cournapeau2009-12-031-1/+5
|
* Fix some more issues for ccompiler: string module obsolete.David Cournapeau2009-12-031-2/+2
|
* Fix raise + print stmts in ccompiler.David Cournapeau2009-12-031-24/+25
|
* first set of checkins from the doc editorJarrod Millman2009-11-131-14/+195
|
* Fix distutils issue on AIX with aix compilers.David Cournapeau2008-07-091-1/+1
|
* Reverting r4481, see #723Jarrod Millman2008-04-201-0/+63
|
* Fixed setting of distutils.[plat]ccompiler.[plat]ccompiler leading to ↵Matthew Brett2008-03-101-2/+1
| | | | attribute error
* removed split_quoted as per #619Jarrod Millman2007-11-211-58/+0
|
* ran reindent.py to clean up whitespaceJarrod Millman2007-10-291-1/+1
|
* using faster string methods rather than deprecated string moduleJarrod Millman2007-10-291-1/+2
|
* Using the in operator to find substrings. It is shorter and easier to ↵Jarrod Millman2007-10-291-1/+1
| | | | understand.
* apply gen_lib_options overwrite only when a compiler module is importedPearu Peterson2007-10-021-3/+4
|
* Add msvccompiler to those injected with gen_lib_optionscookedm2007-09-251-1/+1
|
* Inject our numpy.distutils.ccompiler.gen_lib_options into the variouscookedm2007-09-251-0/+8
| | | | distutils.*compiler modules (esp. msvccompiler)
* fixing link error: fixed. Removing debug messages and added a warning ↵Pearu Peterson2007-09-231-1/+0
| | | | message on the situation that triggered this issue: numpy.distutils must always be imported before distutils.
* fixing link error: added debug message, 2.Pearu Peterson2007-09-231-1/+1
|
* fixing link error: added debug messagePearu Peterson2007-09-231-0/+1
|
* in ccompiler.CCompiler_customize_cmd, allow a list of command attributes tocookedm2007-08-171-9/+11
| | | | | ignore when customising. This will be used to simplify some of the compiler customisation in command/
* remove debug messages.Pearu Peterson2007-07-281-1/+0
|
* msvc_on_amd64 must be applied *after* importing ccompiler module, apply ↵Pearu Peterson2007-07-271-1/+9
| | | | quote_args also to include_dirs.
* Added debug messages to see if quote_args are applied properly.Pearu Peterson2007-07-271-0/+1
|
* Using own quote_args, trying to fix build failures with MSVC compiler.Pearu Peterson2007-07-271-2/+3
|
* Give a hint when getting "Too many open files" failure.Pearu Peterson2007-07-251-1/+5
|