diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2022-02-04 16:21:58 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2022-02-05 10:05:54 -0700 |
commit | df8d1fd3c2077ca785b0948912162e03727ace6c (patch) | |
tree | 01dc1266363997d7fd8e181a2cfefaddaef9751c /numpy/core/setup_common.py | |
parent | f32f47d58e51111a9c995b2f53dab0d0bdb1c927 (diff) | |
download | numpy-df8d1fd3c2077ca785b0948912162e03727ace6c.tar.gz |
MAINT: Replace LooseVersion by _pep440.
LooseVersion is provided by Python distutils, which is going away in
3.12. This PR vendors _pep440 from scipy and uses it as a replacement.
Numpy distutils is not touched, replacing LooseVersion in that package
was considered too risky, and numpy distutils will need to go away when
Python distutils does.
Diffstat (limited to 'numpy/core/setup_common.py')
-rw-r--r-- | numpy/core/setup_common.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index 772c87c96..20d44f4ec 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -50,17 +50,6 @@ C_API_VERSION = 0x0000000f class MismatchCAPIWarning(Warning): pass -def is_released(config): - """Return True if a released version of numpy is detected.""" - from distutils.version import LooseVersion - - v = config.get_version('../_version.py') - if v is None: - raise ValueError("Could not get version") - pv = LooseVersion(vstring=v).version - if len(pv) > 3: - return False - return True def get_api_versions(apiversion, codegen_dir): """ |