summaryrefslogtreecommitdiff
path: root/numpy/distutils/mingw32ccompiler.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: cleanup unused Python3.8-only code and referencesClément Robert2023-03-141-4/+1
|
* MAINT: use pypy3.9 in testingmattip2023-01-081-5/+7
|
* MAINT: always use sys.base_prefix, never use sys.real_prefixDimitri Papadopoulos2022-10-131-4/+1
| | | | | | | | | | | `sys.base_prefix` was introduced in Python 3.3, so it will always be available in supported versions of Python >= 3.3: https://docs.python.org/3/library/sys.html#sys.base_prefix As a result, `sys.real_prefix` will never be used in supported versions of Python >= 3.3. Besides, it has been removed from recent versions of virtualenv: https://github.com/pypa/virtualenv/issues/1622
* Questionable removal of python <3.6 related thingsBrigitta Sipocz2022-05-171-3/+0
|
* Fix issue probably-meant-fstring found at https://codereview.doctorcode-review-doctor2022-04-231-1/+1
|
* DEP: remove code for supporting GCC <4 in Mingw32CCompilerChristoph Reiter2021-11-091-69/+12
| | | | | | | The last GCC 3.x release before 4.0 was 3.4 which was released 2004, so 17 years ago. Removes all code only used with those old toolchains.
* Remove fix for odd MSVCRT version on Windows 3.7Matthew Brett2021-10-221-2/+0
| | | | | | | | | | | | | | | The comment in the original code came about because of the bug fixed in gh-20155. The fixed subsequent clause should now give the correct assembly version for the given Python. In fact, the original clause matches the MSVC for Python 3.7.1: ``` PS C:\> .\Python37\python.exe .\io\check_versions.py sys.version 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] distutils build version 14.1 msvcrt.CRT_ASSEMBLY_VERSION 14.15.26726.0 ```
* Fix automatic detection for MSVCRT versionMatthew Brett2021-10-221-4/+6
| | | | | Original algorithm appended both character of minor version > 9, but the string against which it is being matched, only uses the first character.
* Patch to allow for 2 as a minor version (!)Matthew Brett2021-10-211-3/+2
| | | | | The float representation of e.g. 14.2 is not exact, leading to a minor version number of int(1.999999) == 1 in the original code.
* MAINT: Fix LGTM.com warning: File is not always closedDimitri Papadopoulos2021-10-061-4/+3
| | | | File may not be closed if an exception is raised.
* fix exception cause in mingw32ccompiler.pyPhanatosZou2021-01-031-1/+1
|
* TST: fix tests for windows + PyPymattip2020-07-301-10/+14
|
* MAINT: use list-based APIs to call subprocesses (#15714)Sebastian Berg2020-03-071-23/+27
| | | | | | * MAINT: use list-based APIs to call subprocesses * TST, MAINT: add a test for mingw32ccompiler.build_import, clean up lib2def Co-authored-by: Matti Picus <matti.picus@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-061-3/+2
| | | | | | | * Cleanup unused imports (F401) of mostly standard Python modules, or some internal but unlikely referenced modules * Where internal imports are potentially used, mark with noqa * Avoid redefinition of imports (F811)
* [MAINT] Cleanup python2 sys.version checksSeth Troisi2020-01-201-5/+1
|
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* MAINT: Use textwrap.dedent for multiline stringsEric Wieser2019-06-121-15/+16
| | | | | | 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: 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
* MAINT: remove redundant importsEmil Hessman2018-09-301-1/+0
|
* DOC: fix minor typosUnknown2017-12-121-1/+1
|
* MAINT: small robustness change for mingw support on Windows.Ralf Gommers2017-11-091-1/+2
| | | | | Closes gh-9839. Note that the second part of the patch there was already fixed in commit 7a05f44ec.
* BUG: fix regression in 1.13.x in distutils.mingw32ccompiler.Ralf Gommers2017-08-151-1/+1
| | | | | | Issue was introduced in gh-8454. Thanks to @jennirinker for pointing out the issue and fix. Closes gh-9553.
* BUG: Handle MinGW module compilation in Py2.7 venvsRoland Kaufmann2017-06-221-1/+9
| | | | | | | | | | | If we are using the virtualenv module in Python 2.7 (as opposed to venv in Python 3.3+), then the location of the base distribution is stored in the real_prefix attribute instead of the base_prefix attribute. This changeset adds the content of this attribute to the search paths if it exist (i.e. in practice, if we are running Python 2.7), so that the runtime libraries do not have to be duplicated in the virtualenv directory.
* BUG: Make extensions compilable with MinGW on Py2.7Roland Kaufmann2017-06-221-3/+7
| | | | | | | | | | | | The original changeset 1c8ecc7 to make extensions compilable with MinGW used the base_prefix attribute unconditionally. However, this is not available in versions before Python 3.3. This changeset introduces a check for whether the attribute is available so that the code will work without errors also on Python 2.7. However, this may lead to surprising results when compiling in a virtualenv. Hat tip to Diorcet Yann (@diorcety) for pointing out this problem.
* BUG: Skip custom library check if not MSVC runtimeRoland Kaufmann2017-02-231-3/+12
| | | | | | | | | | If Python has been built using a different runtime, for example using the GNU compiler in MSYS, the version string will of course not contain a reference to the MSVC runtime. Instead of attempting to build an import library for yet another runtime, we assume that the compiler used to build the extension is now the same as was used to build Python, and that it will pass the right runtime to the linker without any further command-line options.
* Fix building extensions with MinGW in WinPython 3.4 (#8454)Roland Kaufmann2017-01-221-41/+75
| | | MAINT: Fix building extensions with MinGW in WinPython 3.4
* DEP: Fix escaped string characters deprecated in Python 3.6.Charles Harris2016-12-141-1/+1
| | | | | | | In Python 3.6 a number of escape sequences that were previously accepted -- for instance "\(" that was translated to "\\(" -- are deprecated. To retain the previous behavior either raw strings must be used or the backslash must be properly escaped itself.
* Merge pull request #8356 from rolk/8356_mingw_virtenvCharles Harris2016-12-121-6/+24
|\ | | | | Allow extensions to be built with MinGW in a virtualenv
| * STY: Avoid using string formatting in log callsRoland Kaufmann2016-12-091-6/+5
| | | | | | | | | | | | | | The log class (derived from distutils.log) does string formatting with extra arguments passed, if (and only if) the log level is above the set threshold. That way, the cost of string formatting only incurs if the message is actually going to be displayed.
| * BUG: Search for Python DLL in base distr. with MinGWRoland Kaufmann2016-12-081-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | If an extension is built in a virtualenv, the compiler adapter for the MinGW distribution will search for the libs/ directory containing the import libraries for the Python runtime, in the virtualenv. However, these files are not copied when the virtualenv is created (using the venv module), so the build fails. This patch searches the base distribution directory for the libraries in addition to the virtualenv, allowing extensions to be built without manually copying the libs/ directory first.
* | MAINT: Remove assumptions about RTL name, for MinGWRoland Kaufmann2016-12-091-9/+9
| | | | | | | | | | | | | | | | | | | | The MinGW compiler adapter assumes that the C runtime library that Python was built with has the name msvcrXXX. This is incorrect for Python 3.5 and later. (The name of the runtime is now vcruntimeXXX). This patch removes parsing of the hardcoded pattern and replaces it with calls to new functions in misc_util that returns the desired values directly, isolating the hardcoding to that module.
* | ENH: Monkey-patch CygwinCCompiler for Py3.5 on Wind.Roland Kaufmann2016-12-091-0/+9
|/ | | | | | | | | CygwinCCompiler has its own test for the C runtime library which raises an error if the version extracted from the version string does not match a pre-defined list. The runtime for Visual Studio 14 (aka 2015) which is used to build Python 3.5 is not on this list. As this call is made in the constructor of the base class, it must be monkey-patched to get around.
* DOC: Fix more typos in docs and comments.Dongjoon Hyun2016-02-251-1/+1
|
* MAINT: list litteralRémy Léone2015-11-071-3/+1
|
* Revert "Merge pull request #5614 from charris/cleanup-gh-5587"Charles Harris2015-10-201-45/+22
| | | | | | | | | Revert mingwpy modifications to distutils. They are causing problems for non-windows builds and it is better to wait until mingypy is further along. This reverts commit 96abd32de241864ee97f30357234cbc9a96c43ae, reversing changes made to 06af9918f6bf03b8d818ec834f9fb48db57d1489.
* Revert "Merge pull request #6354 from mingwpy/mingwpy"Charles Harris2015-10-201-10/+9
| | | | | | | | | Revert mingwpy modifications to distutils. They are causing problems for non-windows builds and it is better to wait until mingypy is further along. This reverts commit cda64938eb150b1af6677db4754da3be5fd7e483, reversing changes made to 8cb3ec6ab804f594daf553e53e7cf7478656bebd.
* BLD: mingwpy fixescarlkl2015-09-241-9/+10
|
* STY: Some style cleanups in distutils.Charles Harris2015-02-271-65/+70
| | | | | | Break long lines. Spaces around operators. Remove dead code.
* BLD: Add mingw-w64 support for the mingw64static option.carlkl2015-02-271-16/+28
|
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-10/+10
| | | | | | | 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.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-2/+2
| | | | | | | 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-061-1/+0
|\ | | | | 2to3: Apply `imports` fixer.
| * 2to3: Apply `imports` fixer.Charles Harris2013-04-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-031-3/+6
|\ \ | |/ |/| DOC: Formatting fixes using regex
| * DOC: Used regex to find colons missing spaces which render wrong online, ↵endolith2013-03-191-3/+6
| | | | | | | | also other spacing or formatting mistakes
* | 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
* Merge pull request #3026 from charris/2to3-fix-printCharles Harris2013-03-011-0/+1
|\ | | | | 2to3: Put `from __future__ import division` in every python file.
| * 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+1
| | | | | | | | | | | | | | | | 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.
* | 2to3: Apply `methodattrs` fixes.Charles Harris2013-03-011-4/+1
|/ | | | | Replaces old style `f.im_func` and `f.im_class` method attributes with `f.__func__` and `f.__class__`. Closes #3070.
* 2to3: Apply `funcattrs` fixer. Closes #3058.Charles Harris2013-02-281-1/+1
| | | | | This replaces the `b.func_xxxx` with newer `__xxxx__` attribute names For example, `f.__name__` replaces `f.func_name`