summaryrefslogtreecommitdiff
path: root/numpy/distutils/command
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: improve failure message when compiler is unavailablePearu Peterson2021-02-091-0/+2
|
* BUG: don't mutate list of fake libraries while iterating over it (#18295)Nicholas McKibben2021-02-041-2/+5
| | | | | | | | | | | | | | | | | * BUG: don't mutate list of fake libraries while iterating over it * BUG: iterate over copy of list * TST: add build test for build_ext fix (#1) * TST: add build test for build_ext fix * TST: clearer test name * STY: use triple quotes instead of lists of strings * FIX: check for f77 compiler before test is run * DOC: add comment explaining that a list copy is necessary
* BUG, BLD: Generate the main dispatcher config header into the build dirSayed Adel2021-01-032-11/+29
| | | | | | | | | | The new path becomes `build/src.*/numpy/distutils/include/npy_cpu_dispatch_config.h` instead of `numpy/core/src/common/_cpu_dispatch.h`. The new path allows other projects to re-use the CPU dispatcher once we decide to expose the following headers: - `numpy/core/src/common/npy_cpu_dispatch.h` - `numpy/core/src/common/npy_cpu_features.h`
* MAINT: regex char class improveTyler Reddy2020-12-281-4/+4
| | | | | | | | | | | | | * replace superfluous single-character regex character classes with their literal string equivalents; this avoids the overhead associated with a character class when there's only a single character enclosed (so there's no benefit to the class overhead) * for more information see: Chapter 6 of: Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O’Reilly Media, 2009.
* MAINT, TST: Serveral imporvments to _SIMD moduleSayed Adel2020-10-271-1/+1
| | | | | | | | | | | | | | | | | | - use plain variables - clean up aligned allocate - use `PyArg_ParseTuple` for empty args - use `Py_ssize_t` instead of `unsigned` and `size_t` - improve coding style - no need for a custom raises assertions - use parametrize instead of inner loops - leave a comment about nature of mode testing unit - shift to get max/min of int72 - add more info to repr of vector object - get ride of exec() and use type() instead - use `.inc` as extension for sub-headers instead of `.h` - add `FMA4` and drop `SSE41` from _SIMD targets Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* ENH: Expose the NumPy C SIMD vectorization interface "NPYV" to PythonSayed Adel2020-10-272-2/+18
| | | | | | | | | | | | | | | | '_simd' is a new module to bring the NumPy C SIMD vectorization interface "NPYV" The module is designed to be extremely flexible so that it can accommodate any kind intrinsics, also to generate a python interface almost similar to the C interface. The main purpose of this module is to test NPYV intrinsics in python, but still can be used as an effective solution in designing SIMD kernels. Also add a new command-line argument `--simd-test` to control of targeted CPU features for the `_simd` module. Co-authored-by: Matti Picus <matti.picus@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* Merge pull request #17546 from seiko2plus/issue_17321Matti Picus2020-10-152-65/+61
|\ | | | | MAINT: explicit disabling `CCompilerOpt` in F2PY
| * MAINT: Explicit disabling `CCompilerOpt` in F2PYSayed Adel2020-10-132-65/+61
| | | | | | | | This patch also cleans up `CCompilerOpt` calls in build_ext and build_clib.
* | BLD: add new check_compiler_gcc and check_gcc_version_at_least configureE. Madison Bray2020-10-132-8/+39
|/ | | | | | | commands replaces obsolete (no longer used anywhere AFICT check_compiler_gcc4 with some more general utilities for checking GCC version
* MAINT: Delete obsolete conversion to list (gh-17052)jakobjakobson132020-08-111-1/+1
| | | see gh-17012 item 12
* ENH: [3/7] enable multi-platform SIMD compiler optimizationsSayed Adel2020-06-153-5/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Put `CCompilerOpt` in action through add two command line arguments that passed directly to `CCompilerOpt`'s parameters which explained as follows: * `--cpu-baseline` minimal set of required optimizations, default is 'min' which provides the minimum CPU features that can safely run on a wide range of users platforms. * `--cpu-dispatch` dispatched set of additional optimizations, default is 'max-xop-fma4' which enables all CPU features, except for AMD legacy features. the new arguments can be reached from `build`, `build_clib`, `build_ext`, if `build_clib` or `build_ext` are not specified by the user the arguments of `build` will be used, which also hold the default values. - Activate the new compiler dispatcher that comes with `CCompilerOpt`, through adding a hock inside `build_clib` and `build_ext` that works as a filter taking any C source files ends with `.dispatch.c` and pass it directly to `CCompilerOpt` and then take returned objects and linked to the final C lib. - Add a third command-line argument `--disable-optimization` which explicitly disable the whole new infrastructure, also It adds a new compiler definition called `NPY_DISABLE_OPTIMIZATION`. when `--disable-optimization` is enabled the dispatch-able sources that end with `.dispatch.c` will be treated as a normal C sources, also due to this disabling any C headers that generated by `CCompilerOpt` must guard it with `NPY_DISABLE_OPTIMIZATION`, otherwise, it will definitely break the build. - New auto-generated C header located at `core/include/numpy/_cpu_dispatch.h`, the new header contains all definitions and headers of CPU features that enabled according to specified configuration in `--cpu-baseline` and `--cpu-dispatch`.
* BLD: Avoid "visibility attribute not supported" warning (gh-16288)E. M. Bray2020-05-201-1/+4
| | | | | | | | | | | | I found that when building the latest master branch on Cygwin, while testing #16246, that thousands of warnings were generated at build time like: numpy/core/src/npysort/binsearch.c.src: In function ‘binsearch_left_bool’: numpy/core/src/npysort/binsearch.c.src:82:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] Granted this is just a warning, so I don't think it's a serious issue. It seems the test that was supposed to check for __attribute__ support was not working as expected. The #pragmas only take effect if I provide a function body--they are ignored for bare declarations. I don't know if that's by intent, or if it's a GCC issue. For reference: $ gcc --version gcc (GCC) 7.4.0
* BUG: relpath fails for different drives on windows (#16308)Matti Picus2020-05-201-1/+1
| | | | | * BUG: relpath fails for different drives on windows * ENH: always use abspath
* ENH: Fix exception causes in build_ext.pykeremh2020-04-221-2/+2
|
* ENH: Fix exception causes in build_clib.pykeremh2020-04-211-2/+2
|
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-062-8/+9
| | | | | | | * 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)
* STY,MAINT: avoid 'multiple imports on one line' (flake8 E401)Mike Taves2020-01-281-3/+4
| | | | | | * PEP 8: "Imports should usually be on separate lines" * Where modified, sort imported modules alphabetically * Clean-up unused imports from these expanded lines
* Merge pull request #15248 from eric-wieser/avoid-exc_infoCharles Harris2020-01-051-5/+3
|\ | | | | MAINT: cleanup use of sys.exc_info
| * MAINT: cleanup use of sys.exc_infoEric Wieser2020-01-051-5/+3
| | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | 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-0318-36/+0
|/ | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* BUILD: change to build_src --verbose-cfg, runtests.py --debug-infomattip2019-10-031-4/+4
|
* BUILD, DOC: fix 14518, add release notemattip2019-09-221-1/+1
|
* BUILD: add warn-error option to turn compiler warnings into errors (-Werror)mattip2019-09-203-3/+29
|
* MAINT: move the option to build_src, simplifies logicmattip2019-09-202-7/+6
|
* BUILD: add --debug-configure option to reduce output, use logger moremattip2019-09-202-9/+13
|
* Use *sys.version_info[:2]Hugo2019-08-262-2/+2
|
* BUG: Fix for Python 3.10Hugo2019-08-262-2/+2
|
* MAINT: Remove unnecessary backslashes when not needed.MSeifert042019-07-022-6/+6
| | | | See also: #13880
* MAINT: Use textwrap.dedent for multiline stringsEric Wieser2019-06-122-136/+143
| | | | | | 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.
* BUG: setup.py install --skip-build failsmattip2019-05-261-0/+3
|
* BUG: Adding macro HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICSRaghuveer Devulapalli2019-04-192-0/+26
| | | | | | | | | 1) use __builtin_cpu_supports("avx512f") only for gcc ver >= 5 2) Introduced two new macro's: HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICS for ensuring compiler can compile functions that use intrinsics and are compiled with avx2/avx512f attributes
* DEV: cleanup imports and some assignments (from LGTM)mattip2019-03-171-2/+2
|
* MAINT: Use with statements for opening files in distutilsEric Wieser2019-03-012-46/+35
| | | | | | Not super important, but saves some lines. Only the low-hanging ones here. Found while tracking down an unrelated ResourceWarning
* MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-062-3/+1
| | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* Use set litteralsRoman Yurchak2018-11-241-2/+2
|
* MAINT: remove unused stdlib importsEmil Hessman2018-09-301-2/+0
|
* MAINT: avoid modifying mutable default valuesEmil Hessman2018-09-291-3/+6
|
* MAINT: remove usage of exec_command in config.pyTyler Reddy2018-09-121-6/+27
| | | | | | * replace usage of exec_command() with standard library equivalent in the distutils config module
* Merge pull request #11909 from mattip/flake8-cleanupsCharles Harris2018-09-111-1/+0
|\ | | | | MAINT: flake8 cleanups
| * MAINT: remove redundant importsmattip2018-09-091-1/+0
| |
* | MAINT: remove exec_command from build_extTyler Reddy2018-09-101-4/+8
|/ | | | | | | * the single usage of exec_command in distutils build_ext module has been replaced with a standard library usage of subprocess
* BLD: cleanup _configtest.o.d during buildAllan Haldane2018-06-011-2/+6
|
* More misc. typosluz.paz2018-01-041-1/+1
| | | Found via `codespell`
* BUG: skip the extra-dll directory when there are no DLLSxoviat2018-01-031-2/+2
| | | | | | | When the gfortran functionality is not used, we don't want to enable the __config__ functionality. This mistake was put in as an earlier optimization but led to failures with conda.
* BUG: distutils: use correct top-level package namexoviat2017-12-241-10/+20
| | | | | | | | 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
* distutils: handle unlinkable object files in build_clib/build_ext, not gnuPauli Virtanen2017-09-022-26/+86
| | | | | | | | | | | | | | | | | | | | | | 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-022-81/+117
| | | | | | | | | | 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
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-1/+1
| | | | Bare except is very rarely the right thing