summaryrefslogtreecommitdiff
path: root/numpy/distutils/misc_util.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: use list-based APIs to call subprocesses (#15714)Sebastian Berg2020-03-071-3/+2
| | | | | | * 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>
* DOC: distutils: Add a docstring to show_config().Warren Weckesser2020-01-251-0/+37
| | | | | | | Thanks to Sergey Kojoian for the original patch to create the docstring. Closes gh-9258.
* MAINT/DOC: Remove use of old Python __builtin__, now known as builtinsMike Taves2020-01-241-1/+0
|
* MAINT: Replace basestring with str.Charles Harris2020-01-231-2/+1
| | | | | | | This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py
* MAINT: remove internal functions required to handle Python2/3 logicMike Taves2020-01-221-12/+2
|
* [MAINT] Cleanup python2 sys.version checksSeth Troisi2020-01-201-4/+1
|
* Merge pull request #15248 from eric-wieser/avoid-exc_infoCharles Harris2020-01-051-4/+2
|\ | | | | MAINT: cleanup use of sys.exc_info
| * MAINT: cleanup use of sys.exc_infoEric Wieser2020-01-051-4/+2
| | | | | | | | | | | | This code originates from python 2.6, before there was an `as` clause in `except`. This removes all callers of `numpy.distutils.compat.get_exception`.
* | MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-2/+2
| | | | | | | | | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* | 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: Added Python3.8 branch to dll lib discoveryIlhan Polat2019-11-241-2/+5
|
* DOC,BUG: remove section header, add redundant text to leave a blank linemattip2019-09-161-2/+0
|
* ENH: Allow NPY_PKG_CONFIG_PATH environment variable overrideEsben Haabendal2019-09-131-1/+51
| | | | | | Allow overriding npy-pkg-config directory using the NPY_PKG_CONFIG_PATH environment variable, making it easier to use numpy in cross-compilation setups.
* MAINT: distutils: Add newline at the end of printed warnings.Warren Weckesser2019-09-111-1/+1
|
* MAINT: fix 'in' -> 'is' typoThomas A Caswell2019-06-141-1/+1
| | | | | | | | This is generating a SyntaxWarning. It looks like it has been like this from 2006 (8869df5b1cba1ffeda6d772eee1a7507fe18bdef) when this first came into the code base.
* MAINT: Use textwrap.dedent for multiline stringsEric Wieser2019-06-121-26/+26
| | | | | | 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 with statements for opening files in distutilsEric Wieser2019-03-011-40/+33
| | | | | | Not super important, but saves some lines. Only the low-hanging ones here. Found while tracking down an unrelated ResourceWarning
* BUG: Fixes to numpy.distutils.Configuration.get_version (#13056)Eric Wieser2019-03-011-33/+22
| | | | | | | | | | | | | | | | | | | | * BUG: Use subprocess.check_output to avoid leaking file handles This emitted a ResourceWarning as previously written, as the streams never got closed. This change also detects errors in `svnversion` and `hg`, rather than ignoring the error code and hoping stdout contains a revision anyway. * BUG: Fix distutils.get_version on python 3 Previously, this would throw `TypeError: cannot use a string pattern on a bytes-like object`, which would then be silenced and never seen. The previous commit stopped silencing this error, so now everything is visibly broken rather than silently broken Changing the strings to raw strings fixes the problem * BUG: Don't use `close_fds`, which fails on windows This argument was introduced along with subprocess in f5afa7836d56640f25ff3fbd2c59b8dcf016e26f to replace `popen4`, and probably wasn't necessary in the first place.
* MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-061-2/+0
| | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* Merge pull request #12209 from anntzer/get_build_archRalf Gommers2018-10-201-1/+6
|\ | | | | MAINT: delay import of distutils.msvccompiler to avoid warning on non-Windows.
| * Delay import of distutils.msvccompiler to avoid warning on non-Windows.Antony Lee2018-10-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *Importing* distutils.msvccompiler works on non-Windows systems, but triggers a pointless "warning" (using distutils' own logging system; "Can't read registry etc.") Delay the import so that other uses of distutils.misc_util are not affected. When running distutils commands, the verbosity is set by default to 1 (`self.verbose = 1` in distutils/dist.py) so the warning does get displayed. To trigger the warning, subclass e.g. build_ext, override its finalize_options method, import numpy.distutils.misc_util from there, and then pass the new build_ext as cmdclass to setuptools.setup(). Partially reverts 15f52f5.
* | DOC: tweak grammarmattip2018-10-091-1/+1
| |
* | BUG: limit default for get_num_build_jobs() to 8Jeroen Demeyer2018-10-051-1/+4
| | | | | | | | | | | | The default value for get_num_build_jobs() is now the number of CPUs limited to a maximum of 8. This is to prevent overloading systems with a lot of CPUs. See ticket #12087
* | Merge pull request #12061 from ceh-forks/remove-reduntant-importsCharles Harris2018-09-301-2/+0
|\ \ | | | | | | MAINT: remove redundant imports
| * | MAINT: remove redundant importsEmil Hessman2018-09-301-2/+0
| |/
* | MAINT: remove redundant assignmentEmil Hessman2018-09-301-1/+0
|/
* BUG: Revert #10229 to fix DLL loads on Windows.Charles Harris2018-06-291-13/+3
| | | | | | | | | | | Numpy wheels on Windows were clearing the ctypes path when they loaded the OpenBLAS DLL, leading to failure of DLL loads subsequent to NumPy import because the needed DLLs could not be found. This isn't a straight revert, it restores to the 1.15.x version of the relevant code. Closes #11431.
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-161-2/+2
|
* Sort input file listBernhard M. Wiedemann2018-05-271-4/+9
| | | | | | | | | | so that the python-scikit-learn openSUSE package that uses config.add_extension(name, "path/to/*.cpp", ...) builds in a reproducible way in spite of indeterministic filesystem readdir order and http://bugs.python.org/issue30461 See https://reproducible-builds.org/ for why this is good.
* fix failing testmattip2018-04-111-6/+6
|
* formatting fixesmattip2018-04-111-6/+6
|
* BUG: fix config where PATH isn't set on win32xoviat2018-01-071-1/+2
|
* Merge branch 'master' into config-load-dllxoviat2017-12-301-2/+7
|\
| * BUG: distutils: use correct top-level package namexoviat2017-12-241-1/+1
| | | | | | | | | | | | | | | | Here, we align the extra-dll name to the one that auditwheel uses, and we handle the case where 1) there is more than one root package and 2) the root package name is different than the distribution name
| * ENH: distutils: set NPY_NUM_BUILD_JOBS to cpu_countxoviat2017-12-171-1/+6
| |
* | BUG: distutils: use AddDllDirectory where availablexoviat2017-12-171-2/+17
|/ | | | | | This should reduce some DLL hell scenarios, namely scipy/scipy#8064. partial credits to @carlkl
* Make system_info output reproducible (#9652)Chris Lamb2017-09-051-1/+1
| | | | | | | | | | | Whilst working on the Reproducible Builds effort [0], we noticed that python-numpy generates output that is not reproducible. This affects "downstream" packages such as numexpr. This occurs as it encodes the absolute pathname into the generated file. [0] https://reproducible-builds.org/ Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
* distutils: handle unlinkable object files in build_clib/build_ext, not gnuPauli Virtanen2017-09-021-19/+5
| | | | | | | | | | | | | | | | | | | | | | 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/+21
| | | | | | | | | | 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.
* MAINT: Remove unnecessary importsSrinivas Reddy Thatiparthy2017-08-261-4/+0
| | | | - Now that `set` datastructure has been added the `builtin` module, we do not need to explicitly import from `sets` module
* DOC: BLD: fix lots of Sphinx warnings/errors.Ralf Gommers2017-06-101-13/+15
|
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-3/+3
| | | | Bare except is very rarely the right thing
* BUG: check compiler flags to determine the need for a rebuildJulian Taylor2017-05-021-0/+12
| | | | | | | 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.
* 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 #8355 from rolk/8355_mingw_py35Charles Harris2016-12-121-11/+26
|\ | | | | Fix building extensions with MinGW for Python 3.5
| * ENH: Recognize C RTL used by Py3.5 on WinRoland Kaufmann2016-12-091-1/+5
| | | | | | | | | | | | | | | | Python 3.5 is built against vcruntime140 instead of msvcrXXX, and the internal version number reported by the version string is 1900. This cause building extensions to fail, complaining about a missing compiler. This patch adds the latest runtime library to the list.
| * MAINT: Isolate hardcoded RTL name and vers. on Win.Roland Kaufmann2016-12-091-11/+22
| | | | | | | | | | | | | | | | | | | | | | There are three concepts in the C runtime library used by Python on Windows (from the Microsoft Visual C compiler); the internal build number (e.g. 0x1600), the major version of the runtime (e.g. 10.0), and the name of the link library of the runtime (e.g. msvcr100). This patch separates getting these three values into separate functions so that other code can be relieved of parsing the string return value of the msvc_runtime_library function.
* | MAINT: Other cleanup Python < 2.7 and Python3 < 3.4Alexandr Shadchin2016-12-091-18/+1
|/
* ENH: Add stacklevel to all (or almost all) our function callsSebastian Berg2016-09-021-1/+1
|
* DOC: Corrected allowed keywords in add_(installed_)libraryOleksandr Pavlyk2016-08-261-4/+4
| | | | | | | | | | | Docstring listed extra_f77_compiler_args and extra_f90_compiler_args as allowed keywords, but per command/build_clib.py, lines 193-194 the recognized keywords are in fact extra_f77_compile_args and extra_f90_compile_args. The keyword extra_compiler_args, although non-confirmant both for fortran keywords and to the keywords of add_extension, is consistent with the implementation (see line 200 of build_clib.py).