summaryrefslogtreecommitdiff
path: root/numpy/distutils/misc_util.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: remove redundant open() modes and io.open() aliasMike Taves2022-10-291-2/+2
|
* MAINT: change subprocess arguments from Python>=3.7Mike Taves2022-10-271-1/+1
|
* Fix a potential variable misuse bugJingxuan He2022-06-151-1/+1
|
* MAINT: Python <3.8 related cleanupsBrigitta Sipőcz2022-05-231-6/+1
|
* MAINT: Python <3.7 related cleanupsBrigitta Sipőcz2022-05-231-2/+1
|
* Remove python <3.6 related thingsBrigitta Sipocz2022-05-171-4/+1
|
* ENH: provide a convenience function to replace npy_load_module (#20395)Matti Picus2021-11-191-8/+17
| | | | | | | `load_module` is deprecated since python 3.4 and will be removed in python 3.12. Use `exec_module` instead. Provide a convenience function in `distutils.misc_utils` instead of `npy_load_module` from `compat.py3k`.
* BLD: Fix Macos Builds [wheel build]Thomas Li2021-11-171-1/+1
|
* [demo] how-to replacing numpy custom generation engine by raw C++serge-sans-paille2021-10-221-1/+14
| | | | | This is just a technical prototype to measure and discuss the impact and implication of moving to C++ for kernel code generation.
* DOC: Typos found by codespellDimitri Papadopoulos2021-09-211-2/+2
|
* DEP: Deprecate quote_args (from numpy.distutils.misc_util)Mike Taves2021-09-021-1/+8
|
* DOC: Fix Unknown section warning when building docsmelissawm2021-07-261-41/+41
|
* BLD: Allow cygpath errors to propagate from cyg2win32.DWesl2021-07-231-6/+4
| | | | | | The only reasons I can think for this to fail are an incomplete installation or an environment hostile to fork(), both of which should probably be fixed before trying to compile NumPy.
* STY: Wrap long lines in cyg2win32 docstring.DWesl2021-07-221-6/+8
|
* BLD: Change `cyg2win32` to use the `cygpath` utility.DWesl2021-07-221-4/+36
| | | | | | | | | | | | | | | | | | | | The old function only handled the default `/cygdrive` prefix. This can be customized to different values: `/` and `/mnt` are both common. `/proc/cygdrive` does the same thing, regardless of user customization. `cygpath` handles all of these. There's also a C function if you'd prefer to avoid the `fork()` call, which tends to be slow on Cygwin. Edit: Fix the cyg2win32 function to have correct types. It returned bytes earlier; this should return a string. Edit: Fix docsrting to follow numpydoc. BLD,DOC: Expand documentation for cyg2win32 Fix a misleading statement, and expand on the things `cygpath` handles that can otherwise be tricky to get right.
* review feedbackJerry Morrison2021-07-121-3/+3
| | | | | | | | * Accelerate in "NumPy 1.21+". I thought the NumPy 1.20.0 release note decommissioned "the Accelerate library as a candidate" but it doesn't mention BLAS. https://github.com/numpy/numpy/pull/15759/files#diff-6fde01624b4d27874d419c0f8aeae3743c4f5e7e1c9f2b039eb453a714d0cbb1R396 seems to affect both but
* Update numpy/distutils/misc_util.py Jerry Morrison2021-07-121-1/+1
| | | | | | | | | | | `:numpy:` Thanks, Matti! Can you illuminate what the colons do in pip install? The doc webpage and CLI help says: > Accepts either ":all:" to disable all binary packages, ":none:" to empty the set (notice the colons), or one or more package names with commas between them **(no colons).** Co-authored-by: Matti Picus <matti.picus@gmail.com>
* code review iterationJerry Morrison2021-07-121-18/+19
| | | | | | | | | | | | | | | | | | * Give the OS-specific site-packages directories for NumPy's OpenBLAS. * Include the `pip install numpy --only-binary numpy` variation, but not `:numpy:` since pip install doesn't document that. `pip install --only-binary numpy numpy` also works but that's confusing to parse. * Drop the sentence on the Accelerate bug on macOS < 11.3 since this isn't the place for it. * Also drop the search-order part about Accelerate? This applies to Numpy 1.19 as well as 1.21+. * Clarify the part about finding external BLAS/LAPACK libs. Some doc should explain what people need to know about installation. If they need portable, reproducible results, they should probably use the same BLAS/LAPACK libs compiled with the same compiler everywhere. It's unfortunate to install NumPy + SciPy linked to Accelerate, along with more pips, only to discover that NumPy won't load on their Mac and have to start over. Or will SciPy reject the older LAPACK API and have problems using different BLAS/LAPACK libs? Installing pips in Docker takes over an hour (vs. 15 minutes) if linking NumPy and SciPy to an external BLAS/LAPACK (and another pip conditionally compiles from source if NumPy did). Worse to have to debug CI failures because their CI on Linux computes different output than Accelerate. Should this also explain how to tell which release of OpenBLAS is included in a NumPy installation? (What got us into installing NumPy from source was needing an OpenBLAS bug fix release.)
* apply suggestions to the wheel caseJerry Morrison2021-07-121-7/+6
|
* fix ")" positionJerry Morrison2021-07-101-1/+1
|
* Document BLAS/LAPACK linking rulesJerry Morrison2021-07-091-0/+24
| | | | | | | | | | ... per recent numpy-discussion@python.org discussion. My aim was to explain the rules clearly including background that developers might need to learn. I made some guesses to fill in details. For sure let me know whatever's wrong or unclear here. Should the website installation page https://numpy.org/install/ link to this doc so developers can learn how to install NumPy for their situation?
* ENH: SIMD architectures to show_configGanesh Kathiresan2021-05-281-0/+20
|
* BUG: Fix non-versioneer usesEric Larson2021-02-251-1/+1
|
* MAINT: Remove dummy_threadingKevin Sheppard2021-02-111-4/+1
| | | | Threading is guaranteed to be supported in Python 3.7+
* MAINT: regex char class improveTyler Reddy2020-12-281-3/+3
| | | | | | | | | | | | | * 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.
* ENH: Use versioneer to manage numpy versions.Charles Harris2020-12-081-0/+7
| | | | | | | | | | | | The new tags look like '1.21.0.dev0+98.gaa0453721f', where '98' is the number of commits since the 1.21.0 branch was started and 'aa0453721f'. The chosen form may be specified in the 'setup.cfg' file. This PR adds two new files 'numpy/_version.py' and 'numpy/version.py'. The latter is kept because it is part of the public API and is actually used by some downstream projects, but it is no longer dynamically created. See https://github.com/python-versioneer/python-versioneer/ for more information.
* BLD: Use importlib to find numpy root directory in distutilsDustin Spicuzza2020-11-071-3/+3
| | | | Part of changes for #17620 to prevent importing numpy during builds to support cross compilation.
* MAINT: valid doctest for config_py function show() (#17621)Hassan Kibirige2020-10-261-0/+1
| | | | | | numpy.distutils generates a function `__config__.show`. This change makes the docstring of that function complete (with the required imports) and runnable. This prevents numpy.distutils from adding doctests that will fail -- if picked-up by the test runner.
* MAINT: change "for line in open()" to "with open() as f: ..." in ↵jakobjakobson132020-08-111-9/+10
| | | | | | | numpy/distutils/misc_util.py (gh-#17051) see #17012 item 13 Co-authored-by: Jakob <jakobjakobson13@posteo.de>
* DEP: Remove deprecated python function 'file()'marload2020-07-141-1/+1
|
* 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.